Tune Your Backtests
Backtests can take anywhere from a few seconds to several hours to complete. The amount of time it takes to complete your backtest will depend on many factors such as the complexity of your strategies, the frequency of trades, the total number of transactions, etc…
To improve the speed and performance of your backtests, please review the following guidelines:
- Build Strategy: Use “Build Strategy” to build and test your strategies, before running the full backtest.
- Frequency of trading: Strategies that trade infrequently (i.e. monthly / weekly) will complete faster than backtests that trade several times per tick.
- Total number of trades: Strategies that have less than 100 transactions will complete faster than strategies that have over 100+ transactions.
- Number of legs traded: Strategies that use 1 or 2 legged spreads will complete faster than strategies that use 4 legged spreads. (iron condors, iron butterfly, etc)
- Number of instruments traded concurrently: Strategies that trade one instrument at a time will complete faster than strategies that trade several instruments at a time.
- Split backtests into smaller backtests: Split up your long-running backtests into smaller backtests, such as by different date ranges (2010 – 2014 | 2014-2018) and/or different instrument groups.
If your backtest stops in the middle of execution, please review the following:
- Make sure your backtest Browser Window is active and in the foreground during the entire backtest. Do not run other applications or visit other websites while the backtest is running. Otherwise, your browser may stop responding / hang during the backtest.
- Make sure your internet connection is reliable and continuous. Intermittent internet connectivity may cause problems with your backtests.
- Make sure you have enough physical memory on your system, at least 12 GB+ RAM.
- Make sure your computer does not go to sleep or enter low-power mode during long-running backtests.
- Disable Incremental Updates in the Backtest Settings if your browser hangs or if you have limited memory on your system.