+1 888 340 6572

Chart Backtesting VS Portfolio Backtesting: Difference between revisions

From MultiCharts
No edit summary
No edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 4: Line 4:


Therefore, backtesting results on charts and in the Portfolio Trader should match if:
Therefore, backtesting results on charts and in the Portfolio Trader should match if:
*Only settings supported by both the chart and the Portfolio Trader are used.
* Strategy, signal, and instrument settings are identical.
*Data series and calculation starting points are the same.
* Only settings supported by both the chart and the Portfolio Trader are used.
*Strategy settings are identical.
* Data series and calculation starting points are the same.
 


==Instrument Settings==
==Instrument Settings==


<div class="important">Portfolio workspace should contain only 1 symbol in the [[Data_Numbers|'''Data 1''']] column.</div>
<div class="important">Using several instruments in the Data1 column in the Portfolio Trader may shift the start of the calculation compared to a chart, where there is always a single primary series. For convenience, compare the Portfolio with one primary series (one instrument in the Data1 column) to a single chart.</div>


# [[Changing_Symbols|Only one symbol]] from one [[:Category:Built-in_Data_Sources|data source]] must be used and they must be identical on the chart and in Portfolio Trader.
# [[Changing_Symbols|Only one symbol]] from one [[:Category:Built-in_Data_Sources|data source]] must be used and they must be identical on the chart and in Portfolio Trader.
Line 39: Line 38:
#* [[Strategy_Properties#Setting_Maximum_Bars_Back|Maximum number of bars study will reference]]
#* [[Strategy_Properties#Setting_Maximum_Bars_Back|Maximum number of bars study will reference]]
#* [[Strategy_Properties#Setting_Position_Limits|Position limits]]
#* [[Strategy_Properties#Setting_Position_Limits|Position limits]]
#* [[Strategy_Properties#Setting_Trade_Size|Trade size]]
#* [[Strategy_Properties#Setting_Trade_Size|Trade size]]. '''Percent of Equity''' option should not be used, since it is only supported in Portfolio Trader.
# On the '''Backtesting''' tab:
# On the '''Backtesting''' tab:
#* [[Limit_Order_Execution_Assumptions|Backtesting assumptions]]
#* [[Limit_Order_Execution_Assumptions|Backtesting assumptions]]
Line 56: Line 55:


[[Category:FAQ]]
[[Category:FAQ]]
[[Category:Portfolio Trading]]
[[Category:Portfolio Trading|H]]
[[Category:Backtesting]]
[[Category:Backtesting]]

Latest revision as of 16:05, 16 September 2024

Strategies in the Portfolio Trader and on charts are calculated using the same fundamental rules.

However, some calculation settings are supported only in the Portfolio Trader, while others are supported only on charts.

Therefore, backtesting results on charts and in the Portfolio Trader should match if:

  • Strategy, signal, and instrument settings are identical.
  • Only settings supported by both the chart and the Portfolio Trader are used.
  • Data series and calculation starting points are the same.

Instrument Settings

Using several instruments in the Data1 column in the Portfolio Trader may shift the start of the calculation compared to a chart, where there is always a single primary series. For convenience, compare the Portfolio with one primary series (one instrument in the Data1 column) to a single chart.
  1. Only one symbol from one data source must be used and they must be identical on the chart and in Portfolio Trader.
  2. The following parameters should be set identically:
Data Range and Time Zone for Portofio are specified in the common Data settings.

Signal Settings

  1. Signal inputs on the chart should match those in Portfolio precisely.
  2. Intra-Bar Order Generation has to be disabled on charts, because this mode is not available in Portfolio.

Strategy Settings

The following strategy settings should also match:

  1. On the Properties tab:
  2. On the Backtesting tab:

Portfolio Trader Specific Settings

The following settings are unavailable on charts, therefore they need to be configured so that they don’t influence Portfolio backtesting. In the Money Management Settings section:

  • Exposure = 100%
  • Max % of Capital at Risk per Position = 100%
  • Margin value = 0
  • Max Potential Loss = 0
Even with all of these recommendations implemented there’s a possibility that the backtesting results in both applications will not match. This is related to the code’s specific and one should review the strategy’s code to find the reason for the discrepancy. An example of how to do that can be found here.