The development of a trading strategy requires steps to evaluate its reliability during its execution in real markets. To achieve this, the developer must develop a testing process to determine its robustness and viability as a previous step before its optimization.
In this educational article, we’ll introduce the steps of a trading strategy’s testing process.
Getting Started with Testing the Trading Strategy
Once the developer completed the programming of a candidate trading strategy, it’s time to confirm if the strategy works as the conceptual model assumes. In this regard, the strategist should follow the following steps:
- Verify the preliminary profitability of the trading strategy.
- Assessing the robustness delivered by the strategy.
The robustness concept relates to the ability to continue generating substantial profits despite adverse market conditions, such as trend changes or extremely volatile conditions. An alternative method for verifying the strategy’s robustness is by assessing if it continues being profitable under a wide basket of markets.
Another critical part of the testing process is to verify the trading rules. As the strategy’s complexity increases, rules also increase in complexity. In this context, the developer must validate that the execution of the buy and sell signals happens at the levels triggered by the strategy’s rules. The verification of entry and exit signals will allow the developer to identify any programming error.
Once the programming stage is verified, the developer should estimate the trading strategy’s profitability considering a reasonably lengthy historical price series.
As a guide, a short-term strategy may be tested using two years of price data, a mid-term would need up to four years, and a long-term up to eight years of historical data. Nevertheless, the window size may vary depending on the strategy type or the market conditions.
With this information, the strategist will have a panoramic overview of the trading strategy’s profitability and risk. In this regard, if the strategy’s performance is deemed acceptable, the developer could advance to the next stage of the testing process.
Nevertheless, if the strategy has a poor performance, the developer should judge if it could be redesigned or discard it.
Finally, for a proper evaluation, the strategy must be run using a standard one unit trading size. This way, the profits would result in multiples of the risk.
The Multimarket and Multiperiod Test
The multimarket and multiperiod test corresponds to the last stage of the testing strategy’s performance. During this historical simulation, the developer must study a set of parameters of the strategy considering a small basket of diversified markets over a broad range of historical periods. In other words, the developer must develop a historical simulation taking a group of different assets using different timeframes.
The developer must select a small portfolio of non-correlated assets; in other words, markets that don’t relate to each other. An example of a non-correlated portfolio is a mix of a commodity, a bond, and a stock index.
Concerning the length of the test period, Robert Pardo suggests that to obtain solid results, the developer should use ten years of historical data for each market. However, it could start from five years of historical prices. Pardo’s figures are related to long-term stock trades using daily timeframes. Intra-day trading systems, as already stated, would require smaller data ranges.
The results obtained from the historical simulation will provide an objective overview of the trading strategy’s profit and risk. Depending on the results obtained, the developer may terminate if the strategy is robust and produces reasonable returns or if it performs poorly and should be rejected. Likewise, the strategist may observe that the strategy presents mixed results, so it should not be rejected entirely.
During the testing process of a trading strategy, the developer must evaluate a broad range of aspects that ensure the correct work during its evaluation.
For example, the developer must verify if the opening and closing trades’ programming rules execute as the strategy requires. After this step, the robustness degree will drive the strategist to conclude if it is viable in real markets, needs improvements, or should be rejected.
Finally, on a multimarket and multiperiod test, the developer must evaluate the strategy’s performance in a small non-correlated portfolio using different timeframes. Once this historical simulation is made, the strategist would be able to confirm if the strategy is robust and viable or reject it before continuing with the optimization stage.
- 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).