OpenTradingSystem v0.5 released

We hereby proudly present version 0.5 of OTraSys, the Open Trading System Framework. This release marks a milestone for the software, for several reasons. The most obvious one being the new name. Since the software is now mature enough for productive testing, we changed the name to avoid possible problems due to the name conflict with another ip. Additionally, the old name was more of a joke that somehow stuck through development.
This release is a continuation from the complete under-the-hood overhaul that v0.4 brought. But aside some bug fixes and improved stability, also a couple of important features made it into the release:

  • The incorporation of trading costs: For backtests the system now considers the trading costs for each transaction. There are 2 new configfile options (TRANSACTION_COST_FIX and TRANSACTION_COST_PERCENTAGE) by which you can model the cost structure of your broker. As trading costs  can render a system unprofitable over time, this is an important aspect for reliable backtests.
  • The performance of the system can now be evaluated in more detail, as the system keeps track of your cash, equity, risk-free-equity (the value of all current positions valued at their current stop loss) for each trading day. Additionally to the still-present statistics summary (invoke the software with --report or -r at the command line) this allows more detailed insights in the performance. For convienence, a shell script plot_performance.sh under /tools will extract the data from the database and plot a performance graph.
  • The way how stoplosses are tracked was completely redone. If you configure the system (SL_SAVE_DB = true) to save SL to database, it will generate a stop loss record for each active position for each trading day and write that to the database at the end. The default is SL_SAVE_DB = false, as this generates a huge amount of data which is often not neccessary (with the exception if you are currently developing a new system and want to test the effect of different stop loss strategies).

Please note that the system is currently working only for stocks correctly. For FOREX, Futures and CFD the P/L calculation is broken, but will be redone in future releases. The database record for all stoplosses was redone and is working again.

 

  • logologo
  • logo_150logo_150
  • orderbookorderbook
  • performanceperformance
  • portfolioportfolio
  • reportreport
  • sl_atrsl_atr
 

New features

  • added a shell script which will generate a performance chart as seen in documentation sample performance
  • for STOCKS: implemented transaction costs (see new config file options), users can now define a fixed amount or a percentage of the value as fee (or mix both)

changed/new config file options

new:

  • TRANSACTION_COSTS_FIX: fixed amount fee in account currency
  • TRANSACTION_COSTS_PERCENTAGE: fee as percentage of position´s value (see configuration)
  • SL_SAVE_DB: save all SL records within database? (true/false)
  • added SL_TYPE = atr which implements a single ATR based stop, simpler than Chandelier (which still works)
  • changed 2 parameters SL_CHANDELIER_ATR_PERIOD and SL_CHANDELIEUR_ATR_FACTOR to SL_ATR_PERIOD and SL_ATR_FACTOR as they apply to both Chandelier and ATR stops

database changes:

Please note that the changes mentioned below break compatibility with prior program versions!

  • added field fee to orderbook_daily and sum_fees',all_time_hightoaccount`
  • added new table performance_record that tracks account information for each day
  • renamed table stoploss_daily to stoploss_record, now using the fields as defined in the documentation (see table stoploss_record)

Bugfixes

  • Reworked drawdown calculation, it is now based on performance records. A drawdown now is a state when the current total (cash + equity) is lower than the all time high total.
  • Fixed an (apparently older) bug that a position would not be considered for a check of SL, if a position (right before that one in the portfolio) was sold on the same day
  • cosmetics: for long-only (and short-only) systems, the statistics report (--report/-r) will show the long (or short) only numbers and not an empty table with nans for the other side
  • fixed a wrong "Covariance matrix inversion failed!" warning which was in fact also printed if it didn't fail
  • not a bug, but a long standing nuisance: within doxygen documentation, all methods are now linked to their implementation, so developers can see the interface of methods

 

You can download the software from the official gitlab repository at https://gitlab.com/werwurm/OTraSys

Comments powered by CComment