How to backtest an ML-driven strategy
In a nutshell, the ML4T workflow, illustrated in Figure 8.1, is about backtesting a trading strategy that leverages machine learning to generate trading signals, select and size positions, or optimize the execution of trades. It involves the following steps, with a specific investment universe and horizon in mind:
- Source and prepare market, fundamental, and alternative data
- Engineer predictive alpha factors and features
- Design, tune, and evaluate ML models to generate trading signals
- Decide on trades based on these signals, for example, by applying rules
- Size individual positions in the portfolio context
- Simulate the resulting trades triggered using historical market data
- Evaluate how the resulting positions would have performed
Figure 8.1: The ML4T workflow
When we discussed the ML process in Chapter 6, The Machine Learning Process, we emphasized that the model's learning should...