Comments for https://ctrader.com/products/2046
Comments for: https://ctrader.com/products/2046
- PPairTraderElite
How do you suggest optimizing parameters without overfitting?
- AAI_PROGRAMMING
Thank you for your question. Optimizing parameters without overfitting is crucial, especially for a multi-parameter portfolio cBot like this. I recommend the following methods:
- Use Walk-Forward Optimization (WFO)
I strongly recommend using cTrader's built-in "Walk-Forward" optimization feature.
This method divides data into In-Sample (training) and Out-of-Sample (validation) periods. It tests how parameters optimized on training data perform on unseen validation data, repeating this process.
This helps select parameters based on robustness to new data, rather than just finding the best fit for historical data (curve-fitting).
- Find "Stable Plateaus"
When reviewing optimization results, avoid selecting the single "peak" setting that yields maximum profit.
For example, a parameter is "spiky" if StopLoss = 40 results in $1000 profit, but StopLoss = 39 or 41 results in a loss. This is a classic sign of overfitting.
Instead, look for a "stable region" (or "plateau") where performance remains consistently positive even as parameters change (e.g., StopLoss between 40 and 50 still yields good results). Stability indicates robustness.
- Evaluate Based on Portfolio Metrics
This cBot manages risk across a portfolio.
When setting the "Fitness" criteria for optimization, I recommend using metrics like "Sharpe Ratio," "Profit Factor," or "Lower Max Drawdown" instead of just "Max Net Profit."
The goal should be stable, risk-adjusted returns for the entire portfolio, not maximum profit from individual pairs.
- Set Logical Parameter Ranges
Narrow down the optimization ranges based on the strategy's logic. For a "gap-filling" strategy, having a StopLoss much smaller than the MinGap, or a TakeProfit that is extremely large, might contradict the strategy's core concept.
Constraining your optimization to realistic ranges (e.g., if MinGap is 10 Pips, search for SL in the 15-50 Pip range) can also help prevent overfitting.
By combining these techniques, you are more likely to find robust parameters that have a higher probability of performing well in future, unseen market conditions, rather than settings that are "brittle" and only worked on past data.
- Use Walk-Forward Optimization (WFO)