+1 888 340 6572

Chart Backtesting VS Portfolio Backtesting: Difference between revisions

From MultiCharts
No edit summary
No edit summary
Line 7: Line 7:
*Only settings supported by both the chart and the Portfolio Trader are used.
*Only settings supported by both the chart and the Portfolio Trader are used.
*Data series and calculation starting points are the same.
*Data series and calculation starting points are the same.
==Calculation Specifics==
{| class="wikitable"
!Portfolio Trader
!Chart
|-
|Money Management, which can limit the submission or volume of orders generated by the strategy in the portfolio.
|Intra-Bar Order Generation in backtesting (On every tick option)
|-
|Trade Size calculated as a Percent of Equity.
|Bar Magnifier (affects only backtesting).
|-
|Option to generate orders within a bar with the Close button (affects only real-time trading).
|Extended Backtesting mode (affects only backtesting).
|-
|Close Position button (affects only real-time trading).
|Ignore Tick Cache in Real-Time on Additional Data Series option (affects only real-time trading).
|-
|PMM keywords.
|Send Intrabar Orders Immediately (affects only real-time trading).
|}


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

Revision as of 13:07, 22 August 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.

Calculation Specifics

Portfolio Trader Chart
Money Management, which can limit the submission or volume of orders generated by the strategy in the portfolio. Intra-Bar Order Generation in backtesting (On every tick option)
Trade Size calculated as a Percent of Equity. Bar Magnifier (affects only backtesting).
Option to generate orders within a bar with the Close button (affects only real-time trading). Extended Backtesting mode (affects only backtesting).
Close Position button (affects only real-time trading). Ignore Tick Cache in Real-Time on Additional Data Series option (affects only real-time trading).
PMM keywords. Send Intrabar Orders Immediately (affects only real-time trading).


Instrument Settings

Portfolio workspace should contain only 1 symbol in the Data 1 column.
  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.