CustomMenu

Saturday, February 1, 2014

Backtesting System V2 Thoughts

During the last few months, I've been studying how to retrofit my backtesting system to to work as plug-in strategy engines for a live trading system.  Commercial algorithmic systems have had a big impact on the design and architecture of the new system.

A table structure for storing the back test results was one of the first focus areas.  At this time, all of the back test results are automatically dumped to CSV files at the end of each run.  Three files are generated:
  • Trade summary - performance metrics for each trade at trade closure.
    • For example, if one multi-legged trade is entered per monthly expiration over a two year period, then there will be 24 summary lines in this file.
  • Trade summary by day - metrics for each trade by day.
    • For example, if the days in trade (DIT) is 30 then each rade will have 30 lines in this file.  For two years of monthly expiration trades, there will be 24 x 30 lines in this file.
  • Trade blotter - list of all of the transactions for each trade (all legs - entry, adjustment, exit).
The first iteration for storing the results of both live and backtested strategy performance looked like the ERM diagram below: