Strategy optimization
Strategy optimization: find robust parameters, not lucky ones
Last updated: · Reviewed by the INDfolio AI research desk
In short
Strategy optimisation on INDfolio AI sweeps the parameter ranges you define — indicator lengths, thresholds, stop and target distances, entry times — and backtests every combination on NSE data with the full Indian cost stack applied. Instead of returning only the single best result, it shows the whole parameter surface as a stability heatmap, so you can choose settings that sit in a broad profitable region rather than on an isolated spike. The optimised strategy then flows straight into walk-forward analysis, Monte Carlo simulation and paper trading on the same engine.
Every rule-based strategy has parameters — an EMA length, an RSI threshold, a stop-loss percentage — and the values you first guessed are rarely the best ones. INDfolio AI’s optimizer sweeps whole ranges of parameters in one run, backtesting every combination on NSE historical data with the full Indian cost stack, and shows you how performance changes across the entire grid.
The point is not to crown the single highest-returning combination — that cell is usually luck. The point is to find the robust zones where a strategy performs well across many neighbouring settings, and then to confirm the choice with walk-forward analysis and Monte Carlo simulation before any real order is placed.
Parameter sweeps in one run
Define ranges for indicator periods, thresholds, stops and targets, and every combination is backtested automatically — no manual re-running.
Real costs on every combination
Each candidate pays brokerage, STT, exchange charges, GST, stamp duty and slippage, so cost-fragile settings are exposed, not hidden.
Rank by what matters
Sort results by drawdown, profit factor, Sharpe or expectancy — not just raw return, which rewards the riskiest settings.
Validation built into the workflow
Send optimized parameters straight into walk-forward analysis and Monte Carlo simulation to separate real edges from curve fits.
Specification
Strategy optimisation on INDfolio AI — specification at a glance
| Dimension | INDfolio AI strategy optimisation |
|---|---|
| Method | Exhaustive grid search over user-defined ranges and steps |
| Parameters | Any numeric strategy input: indicator lengths, thresholds, stops, targets, times, strike offsets |
| Objectives | Sharpe, Sortino, profit factor, return/max drawdown, net profit, expectancy |
| Outputs | Sortable results table, parameter-stability heatmap, per-combination full metrics and trade log |
| Cost model | Full Indian cost stack and slippage applied to every combination |
| Guard-rails | Minimum trade count filter; one-click hand-off to walk-forward analysis and Monte Carlo |
| Availability | Trader plan (₹999/month incl. GST) and above |
| Coding required | None |
How parameter optimization works
Start from any strategy built with AI or the visual builder, and mark which values to explore: an EMA period from 10 to 50, a stop-loss from 0.5% to 2%, a target from 1% to 4%. INDfolio AI backtests every combination across your chosen NSE date range and returns the full results grid — each cell a complete backtest with return, drawdown, win rate and trade count.
Reading the grid is where the skill lies. Suppose a hypothetical NIFTY futures strategy earns well for EMA settings anywhere from 18 to 26, but one isolated spike at 31 doubles the return: the plateau is evidence of a real pattern, and the spike is almost certainly noise. Professionals pick from the middle of stable regions and treat lone peaks as warnings, not discoveries.
The overfitting trap — and how to stay out of it
Optimization is the most dangerous convenience in algo trading. Every extra parameter and every wider range multiplies the combinations tested, and with enough combinations something will fit the historical noise perfectly — producing a backtest that looks superb and a live strategy that never resembles it. This is how most "95% accurate" strategies are manufactured.
The defences are procedural, and INDfolio AI builds them in. Keep parameters few and ranges sensible. Judge candidates on drawdown-adjusted metrics rather than raw return. Prefer plateaus over peaks. And never let an optimized backtest be the final word: the numbers that matter come from data the parameters never touched.
Optimization, walk-forward and Monte Carlo: one pipeline
The three tools answer three different questions. Optimization asks: which settings worked best on history? Walk-forward analysis asks: does re-optimizing on rolling in-sample windows keep working on the unseen out-of-sample data that follows — or was the tuning fitting noise? Monte Carlo simulation asks: across thousands of reshuffled trade sequences, how deep can drawdowns plausibly get, and what should that mean for position size?
On INDfolio AI the three run as one workflow on the same strategy definition: sweep the parameters, walk the winner forward, stress-test the survivor with Monte Carlo, then paper trade it on live NSE data. A strategy that clears all four stages has earned real capital; most ideas fail earlier — which is exactly the point, because every failure caught here is free.
Methodology & assumptions
- Optimisation is an exhaustive grid over user-defined ranges; each combination is a full backtest on the same engine with the same data and cost model.
- Brokerage, STT, NSE transaction charges, GST, stamp duty and slippage are deducted on every combination.
- Results are in-sample by definition; out-of-sample validation via walk-forward analysis is recommended before deployment.
- Optimised historical performance does not guarantee future results.