models
Parameter Optimisation
Training Your Algorithm
Training your algorithm's parameters is a critical step in creating a robust and adaptable trading strategy. It allows the same model to be applied effectively across different markets and timeframes. Spectral Alpha's optimization engine is designed to avoid the common pitfall of overfitting, which often leads to disappointing real-world performance.
Understanding Overfitting
Overfitting occurs when an algorithm is trained too closely to the specific nuances of the historical data. This can lead to a strategy that performs exceptionally well in backtests but fails to generalize to new, unseen data. It's like memorizing the answers to a test instead of understanding the underlying concepts.
Ascent Optimization: A Robust Approach
Spectral Alpha utilizes ascent optimization, a technique that minimizes the risk of overfitting by focusing on one parameter at a time. Here's how it works:
- Sequential Parameter Adjustment: The engine adjusts one parameter while keeping others at sensible default values. This allows it to isolate the impact of each parameter on the algorithm's performance.
- Fixing Robust Values: Once a robust value is found for a parameter, it remains fixed while the engine optimizes the remaining parameters. This prevents the algorithm from becoming overly reliant on specific combinations of parameter values.
- Oversampling for Significance: The engine generates multiple datasets through oversampling, creating a larger number of trades and improving the statistical significance of the optimization process.
- Trade Detrending: during training the engine detrends the trade results to remove any bias the market may have, increasing robustness.
Objective: Profit Ratio and Plateaus
By default, the optimization engine uses the Profit Ratio as its objective metric. This is a robust measure of performance that balances profits against risk.
Plateau Identification:
Instead of simply searching for the maximum or minimum value of the objective function, the engine focuses on identifying broad plateau regions. These regions represent areas where small changes in parameter values result in minimal changes in performance. This approach is less susceptible to overfitting and leads to more stable and reliable algorithms.
Customizable Objectives:
You can also select different objective metrics and configure the engine to search for maximum or minimum values if desired.
Plateau Settings: Fine-tuning the Search
The engine uses LOESS regression to smooth the parameter space and identify plateaus. Two key settings control this process:
- Smoothing (0.3 - 0.75): Controls how smooth the fit line is. Smaller values result in a noisier fit, while larger values produce a smoother fit.
- Sensitivity (0.5 - 1.0): Controls the factor of standard deviation used to identify plateaus. Smaller values find flatter plateaus, which are generally more desirable as they indicate greater stability.
Plateau Selection:
Once a plateau is identified, the engine selects the middle value within that plateau, even if it wasn't specifically tested during the optimization process.
Experimentation is Key:
We recommend experimenting with these settings to gain a deeper understanding of how the engine selects parameter values and how it impacts your algorithm's performance.
The Importance of Robust Parameter Values
In the unpredictable world of financial markets, it's crucial to prioritize stable and robust parameter values over those that simply lead to the best backtest results. Over-optimized parameters are often brittle and fail to perform well on new data. By focusing on robustness, you increase the likelihood of your algorithm achieving consistent success in live trading.