Optimizer is the last ring of backtests that can be applied to the generated strategies to test their robustness and effectiveness. Its idea is to find the most optimal values for a strategy through series of backtests.
The optimal strategy is not always the one with the highest profits. It is the most stable one.
A robust strategy, with real edge in the market is a strategy that does not depend on any one single (or few) trade to achieve its results. It should maintain its high performance even with some of its best hits removed. Optimizer seeks these candidates through the three types of optimization tests developed in StrategyQuant.
⇒ Simple optimization aims to find the optimal solution for a strategy, by changing the tested parameters in multiple tests searching for the best and most stable results.
⇒ Walk-Forward Optimization is a key concept in Optimizer. For its purpose the history data is divided into pieces. Each piece has two segments – In sample (IS) and Out of sample (OOS). The first segment is where the actual optimization is done by using the very same methods, described for the Simple optimization. Once optimized, the strategy is then tested on the OOS segment. This is history data unknown to the strategy and to Optimizer. It does not include the OOS period into the optimization process. This ensures an objective evaluation of the strategy performance.
When the optimization on the first piece of history data is completed (IS + OOS parts), the algorithm takes the next step and performs the same tests on the next piece. To keep the optimization ongoing, it includes part of the IS segment and the whole OOS segment from the previous step to do the IS analysis of the current piece of history data.
⇒ The Walk-Forward Matrix takes the process one step further. It performs multiple Walk-Forward optimizations and tests different In Sample / Out of Sample configurations. By doing this it calibrates the effectiveness of the strategy in simulated real-trading environment. Because financial markets are a volatile, ever changing place, even the best strategy can lose its edge if it does not follow the dynamics of the market.
Regular optimization can be beneficial to a strategy, maintaining its robustness.
The Walk-Forward Matrix answers the important question of how often re-optimization should be performed. Optimizer can give your strategy an edge. If it passes the optimization tests, you can have the certainty that you have a robust and ready-to-use strategy that would perform successfully in real trading. Re-optimization will make it up-to-date for a longer period of time, so that you can use it comfortably and safely.