The simulation of a trading strategy requires a historical data series to assess the stability of the strategy’s results over time. Likewise, the strategist must consider the strategy before determining the window’s size before starting the historical simulation.
This educational article presents the concepts that will allow developers to estimate the data requirements to assess a trading strategy’s stability through a historical simulation process.
Setting the Requirements of Historical Data
As said, the strategy’s simulation process requires historical price data. Of this data, the developer must select a test window to perform the evaluation.
In this regard, in deciding the size of the historical data window, the strategy developer should consider both the statistical robustness and the relevance of the data for the trading system and the market.
However, these requirements will not accurately determine the test window’s size, either in hours, days, or even months. Instead, they provide a guideline for selecting a range of data suitable for developing the historical simulation process.
Suffice to say that the data window selection will have a significant influence on the results of a historical simulation.
In statistical terms, the data window’s length must be large enough for the trading strategy to develop a sufficiently large number of trades to allow the strategy developer to reach meaningful conclusions about its performance.
On the other hand, the data window should be large enough to allow sufficient degrees of freedom for the number of variables used in the trading strategy.
The standard error is a measure used in statistical analysis. The strategist can use this value as a measurement of the sample size impact in the historical simulation.
A high standard error suggests that each trade’s result is far from the strategy’s average profit. On the contrary, a low reading would indicate that the variation in an individual trade result will be closer to the average of the strategy’s benefits.
In other words, the standard error provides the strategy developer with a measure of the reliability of the average win based on the number of winning trades.
Quantifying the Required Amount of Trades
According to the statistical theory, the larger the sample size is, the more reliable the trading strategy’s historical simulation results will be. However, several technical factors, such as data availability, avoids getting as many trades as the developer would like.
The number of required trades increases in long-term systems, which tend to trade less frequently. In this case, the best option is to search for a sufficient amount of trades; another option is to make the data window wider.
In this regard, the statistical theory asks for a minimum sample size of 30 observations to be statistically acceptable. However, the strategy developer must aim for a much larger number of trades because the minimum of 30 samples requires the phenomenon under observation to follow a gaussian distribution, with is unlikely the financial markets would do.
Stability and Frequency of trades
The stability of a trading strategy corresponds to its results’ overall consistency during the strategy’s execution. In this way, as the strategy becomes more stable, it will tend to be more reliable over time.
The developer can distinguish the trading strategy’s stability by verifying whether the trades are distributed uniformly within the test window. Likewise, the strategist can confirm that the strategy is more stable as the standard deviation of the size and duration of the profits/losses shortens.
The frequency of trades will influence the length of the trading window. Thus, the higher the trading frequency, the shorter the historical data needed for historical simulation.
In other words, a fast trading strategy running in markets with high volatility will require a small data window, which could reach up to three years. By contrast, a slower trading strategy, such as daily trend following, will require a larger data window, exceeding five years.
One rule of thumb is: The strategist should make sure the trading system be tested under all market conditions, Bull, bear, sideways markets – under high, medium, and low volatility.
The execution of a trading strategy’s historical simulation requires a data size enough for the developer to evaluate its profitability and stability.
A high-frequency trading strategy will require less data than a long-term strategy, which will require a significant quantity of data, which could exceed three years of data.
The standard error can be used to evaluate the simulation’s results and determine the historical data window’s validity.
The strategist should ensure the trading system is tested under all market conditions: Bull, Bear, Sideways, and under all volatility types in which it is supposed will be used live.
- Jaekle, U., Tomasini, E.; Trading Systems: A New Approach to System Development and Portfolio Optimisation; Harriman House Ltd.; 1st Edition (2009).
- Pardo, R.; The Evaluation and Optimization of Trading Strategies; John Wiley & Sons; 2nd Edition (2008).