+1 888 340 6572

Understanding Backtesting

From MultiCharts

Backtesting is a crucial process in trading, where a trader tests a trading strategy using historical market data to evaluate its effectiveness before applying it to live trading. The primary goal is to verify that a strategy has the potential to be profitable and to understand its risk and return characteristics.

Backtesting Overview

A strategy is a set of Signals applied to a chart. Each signal is a mechanical technical analysis tool, used to systematically specify market entry or exit points according to a set of trading rules implemented in the signal's algorithm.

A strategy has separate Properties, separate from signals' settings.

Once a strategy is applied to a chart, the backtesting process starts. During the backtesting process, the strategy places trades where they would have occurred in the past, according to the set of rules applied. The trades are placed throughout the entire available period of historical data. If strategy is applied to real-time chart, the strategy continues to place new trades as the real-time data is received.

A Performance Report can be generated, based on the trades placed by the strategy and containing statistics and performance measurements.

New trades, placed by the strategy after the performance report has already been generated, will not be added to the performance report in real time. To incorporate the new trades into the performance report should be generated again.

Understanding Report-Chart Synchronization

MultiCharts allows the user to visually match the trades from a Strategy Performance Report with their signals on the chart. For strategies that have hundreds of trades over a long data series, it may be cumbersome to manually match a trade in the Strategy Performance Report to the chart.

The user would have to use the scroll button to find the trade in the data series. Report-Chart Synchronization simplifies this process. Trades on the chart are automatically highlighted when the user hovers his mouse over a trade in the Strategy Performance Report.

To learn more about this feature, see Setting Display Properties.

Understanding Intra-Bar Orders Calculations

Strategy Order Calculation in Real-Time

Each time a new real-time tick is received, MultiCharts evaluates the data to determine if entry or exit order conditions of the strategy are met on that tick. If the conditions are met, the appropriate order is issued.

In some cases it may be possible that both the entry and the exit orders will be executed based on the same tick.

For a detailed description see Order Execution Priority.

Strategy Order Calculation for Historical Data

Historical data available for backtesting will, in most cases, be in the form of bars based on a group of ticks, with only Open, High, Low, and Close prices available.

While it is not possible from these four values to infer the actual price movement within each bar, the Backtesting Engine improves the backtesting accuracy by incorporating intra-bar price movement assumption logic.

For a detailed description of the movement assumption logic, see Intra-Bar Price Movement Assumptions.

In some cases it may be possible that both the entry and the exit orders will be executed based on the same bar.

For a detailed description see Order Execution Priority.