Login Page - Create Account

Support Board


Date/Time: Tue, 14 May 2024 10:41:30 +0000



Post From: automated backtesting - tips, best practices

[2019-02-05 04:35:13]
Chad - Posts: 231
Question: if possible, could you offer some general tips or 'best practices' on what might be the most efficient configuration for backtesting in context of long-timeframe (e.g. 5 years), granular (e.g. 1-min OHLCV bars) data on ~100 instruments with several studies to test for each, and routines to vary the values used for study parameters and order logic while in backtesting mode?

E.g.
- run multiple instances of SC?
- work mostly/totally at ACSIL level (if possible)?
- only use bar-based backtesting?


I've been told by someone with substantial experience developing for SC that, at the application level, it can only perform ~150 backtest permutations per hour. Given the thousands of different combinations that I'll have for the *first* and largest backtest, that'd take several days. But, that may be assuming backtests within the Market Replay module.
I plan to run longer-timeframe and more intricate iterations of backtests each weekend between 17:00 Friday to 02:00 Monday, so a 57-hour window; then Mon-Thu, from 17:00-02:00, I simply run backtests on the prior trading session only, for each instrument. I could do most or all of the Market Replay backtests during the weekend, and limit to bar-based Mon-Thu night.


Additional background info, if interested: I'm looking to build a systematic, fully-automated trading system within SC as much as possible, which includes a backtesting routine to do 'limited optimization' of study parameters and order logic (sizes, limit prices, etc). An obvious, simple example would be a 'fast' SMA crossing above/below a 'slow' one - the backtest would vary the period of both SMAs within their own separate ranges and increment/step-size, as well as some price bar or indicator reference to use with limit prices of buy/sell orders.

I'll be testing across 80 different futures markets (most are outrights, some are spreads) and 30 US stocks. Price bar types (tick vs time) and intervals (1-min, 1-wk, 100-tick) will be set by-instrument in a config file of-sorts, as well as the allowed trading hours (Europe and US session only for most futures, US ETH for stocks). I figure setting this part up will be fairly simple.
Date Time Of Last Edit: 2019-02-06 00:40:54