Difference between revisions of "Why is Data Playback strategy performance different from Backtesting results?"

From MultiCharts
Jump to navigation Jump to search
Line 3: Line 3:
 
===[http://www.multicharts.com/trading-software/index.php/Signal_Settings| Intra-Bar Order Generation] mode enabled===
 
===[http://www.multicharts.com/trading-software/index.php/Signal_Settings| Intra-Bar Order Generation] mode enabled===
  
* Backtesting with bar Magnifier on tries to execute orders only on OHLC prices of the detailed data series. MultiCharts acts like if there were no other prices in-between (between O and H, between H and L etc.). Therefore the signal is calculated at least (4 * number of details series bars + Open and Close of the main series) times on one bar. I.e. if Bar Magnifier is set to 1 minute on a 5 minute chart, the signal will be calculated up to 22 times (4 * 5 +2) per bar.
+
* Backtesting with bar Magnifier enabled attempts to execute orders only on OHLC prices of the detailed data series. MultiCharts acts as if there were no other prices in-between (between O and H, between H and L etc.). Therefore the signal is calculated at least 4 times times on one bar (4 * number of details series bars + Open and Close of the main series). I.e. if the Bar Magnifier is set to 1 minute on a 5 minute chart, the signal will be calculated up to 22 times (4 * 5 +2) per bar.
  
* In Data Playback mode (as well as in real-time calculation) MultiCharts tries to execute orders on every tick that is received, on Close price. I.e. if Bar Magnifier is set to 1 minute on a 5 minute chart, the signal will be calculated only 5 times per bar.
+
* In Data Playback mode (as well as in real-time calculation) MultiCharts tries to execute orders on every tick that is received, on Close price. I.e. if the Bar Magnifier is set to 1 minute on a 5 minute chart, the signal will be calculated only 5 times per bar.
  
 
===[http://www.multicharts.com/trading-software/index.php/Signal_Settings| Intra-Bar Order Generation] mode disabled===
 
===[http://www.multicharts.com/trading-software/index.php/Signal_Settings| Intra-Bar Order Generation] mode disabled===
  
* If BarMagnifier is disabled, in Backtesting the signal is calculated on OHCL prices and Multicharts "thinks" that prices between OHLC exist. Average number of calculations = BarCount * 4 + local minimums and maximums.
+
* If the BarMagnifier is disabled, in Backtesting the signal is calculated on OHCL prices and Multicharts "thinks" that prices between OHLC exist. The average number of calculations = BarCount * 4 + local minimums and maximums.
  
* If BarMagnifier is enabled, in Backtesting the signal is calculated on OHCL prices of the detailed data series and Multicharts "thinks" that prices between OHLC of the detailed data series do not exist. Average number of calculations = BarCount * (detailed series size * 4 + (Open + Close of the main series bar)).
+
* If BarMagnifier is enabled, in Backtesting the signal is calculated on OHCL prices of the detailed data series and Multicharts "thinks" that prices between OHLC of the detailed data series do not exist. Average number of calculations = BarCount * (detailed series size * 4 + (Open + Close of the main series bar)).
  
 
Thus, the number of calculations and available prices differ significantly. This leads to different results.
 
Thus, the number of calculations and available prices differ significantly. This leads to different results.

Revision as of 17:47, 11 June 2014

Data Playback strategy performance and backtesting results will never be exactly the same due to a number of differences between playback and backtesting calculation.

Intra-Bar Order Generation mode enabled

  • Backtesting with bar Magnifier enabled attempts to execute orders only on OHLC prices of the detailed data series. MultiCharts acts as if there were no other prices in-between (between O and H, between H and L etc.). Therefore the signal is calculated at least 4 times times on one bar (4 * number of details series bars + Open and Close of the main series). I.e. if the Bar Magnifier is set to 1 minute on a 5 minute chart, the signal will be calculated up to 22 times (4 * 5 +2) per bar.
  • In Data Playback mode (as well as in real-time calculation) MultiCharts tries to execute orders on every tick that is received, on Close price. I.e. if the Bar Magnifier is set to 1 minute on a 5 minute chart, the signal will be calculated only 5 times per bar.

Intra-Bar Order Generation mode disabled

  • If the BarMagnifier is disabled, in Backtesting the signal is calculated on OHCL prices and Multicharts "thinks" that prices between OHLC exist. The average number of calculations = BarCount * 4 + local minimums and maximums.
  • If BarMagnifier is enabled, in Backtesting the signal is calculated on OHCL prices of the detailed data series and Multicharts "thinks" that prices between OHLC of the detailed data series do not exist. Average number of calculations = BarCount * (detailed series size * 4 + (Open + Close of the main series bar)).

Thus, the number of calculations and available prices differ significantly. This leads to different results.

When BarMagnifier is enabled, Data Playback calculation does not take into account local extremums and additional Open and Close prices of the main series bar.