Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 17:45:56 +0000



Post From: BackTest an AutoTrade System -- Is BaseData Modified per the 4 Samplings per Bar??

[2014-04-29 10:11:04]
Israel Gottlieb - Posts: 14
I understand that during Bar-based BackTest, an Autotrade system is run 4 times per bar -- i.e. at each of OHLC. My question: Consider the first sampling, i.e. which uses the value of the OPEN price; what happens to the BaseData used by e.g. a Stochastic indicator, during that indication. Say the Stochastic specifies LAST price as the basis for its calculation. In real trading, when the price is at OPEN, the LAST price is the same OPEN -- because that's the only price that exists at that point. Is the BaseData LAST price modified to correspond with the OPEN value, when the 1st of 4 iterations is executed on a bar? Or is the value of LAST the same as that given in the historical data, i.e. what turned out to be the CLOSE of the bar? If the latter is true, you can get substantially distorted results from backtesting, since an Autotrader can specify entry on the opening, but will be using indicators that see the completed bar -- i.e. can tell the future!

Please advise what is the correct way to approach this issue. Is there documentation that spells out exactly what the simulator does during backtesting?

I. Gottlieb