How backtesting works
A backtest runs your strategy's exact rules over real historical market data and reports what happened, net of costs. Every assembled strategy can be backtested in one action, and the result is graded automatically.
What actually runs
Preparation. The strategy object is read, 1-minute OHLCV is fetched, resampled to your timeframe, and indicators are warmed up.
Then, for each bar at candle close, in order:
| Check | Effect |
|---|---|
| Entry condition | Opens a position and charges entry costs |
| Exit condition | Closes the position and charges exit costs |
| Stop-loss | Closes the position. If a stop and a target fall inside one candle, the stop is assumed to fill first |
| Take-profit ladder | Closes all or part of the position |
| Trailing levels | Updates the protective or profit-side line |
| Session, window and time exits | Force-closes at a boundary or cutoff |
Afterwards. Metrics are computed, the assessment and grade are derived, and the result is stored and addressable by its reference id.
Every trade is logged with its actual candle prices, its fill, its costs, and the reason it opened and the reason it closed.
Costs are applied
Earlier docs said a backtest assumes "perfect order execution and no slippage." That was wrong.
Every run applies modelled slippage, commission, and, where the market has them, statutory transaction charges. Indian equity is charged STT at the intraday or delivery rate depending on holding period; Indian F&O carries its own family including stamp duty, exchange transaction charges, IPFT, the SEBI turnover fee and 18% GST on the fee components; crypto spot carries a 10 bps exchange fee per leg.
Your results are already net of costs. If you were discounting them further, you were double-counting.
The full schedule per market: Fees & charges.
The window
By default, 1 January 2024 to now, the same for every timeframe and asset class. There is no timeframe-dependent default, and no backtest can start earlier.
You can state your own period in the chat:
backtest the last 6 months
backtest from 2025-01-01 to 2025-06-30
backtest the last 3 months with 5 lakh
See Choosing a test period and Historical data.
The four headline metrics
Read them in this order. Return is last, not first.
1. Total trades
Under 20 and nothing else on the page means much. Sample size is one of five grading components for exactly this reason.
2. Max drawdown
The largest peak-to-trough decline in the equity curve. Convert it to money on the capital you would actually allocate, 22% of ₹10 lakh is ₹2.2 lakh, and ask whether you would have held.
Reported with its duration, its dates, and its recovery time. A drawdown that never recovered within the window reports recovery as absent, not as zero.
3. Sharpe ratio
Mean daily return divided by its standard deviation, annualised. Risk-free rate taken as zero.
| Sharpe | Reading |
|---|---|
| > 2.0 | Exceptional and rare enough to be worth double-checking |
| 1.0 - 2.0 | Good |
| 0.5 - 1.0 | Marginal |
| < 0.5 | The volatility is not being paid for |
| Negative | Underperforms holding cash |
Equity annualises on 252 trading days, crypto on calendar days. So the two are not directly comparable.
4. Total return
Net of costs. Reported alongside gross return, so the gap is your cost drag, the most useful single diagnostic for an over-trading strategy.
Full reference for every figure: Performance metrics.
Six grades
A, B+, B, C+, C, D: from a 0-100 score across five components:
| Component | Points |
|---|---|
| Return | 30 |
| Sharpe | 25 |
| Drawdown | 25 |
| Consistency (profit factor and win rate together) | 15 |
| Sample size | 5 |
| Grade | Score |
|---|---|
| A | ≥ 85 |
| B+ | ≥ 72 |
| B | ≥ 62 |
| C+ | ≥ 52 |
| C | ≥ 42 |
| D | below 42 |
A zero-trade run is graded D immediately.
Grade A means the run scored 85 or more over the window tested. It is not a detection of edge, not a forecast, and not a recommendation to deploy.
Full formula, thresholds and the assessment labels: Strategy grades.
The detailed results page
View Full Backtest from the chat opens the tabbed view:
| Tab | Contents |
|---|---|
| Overview | Headline metrics, monthly performance table, volatility, profit factor, the assessment |
| Performance | The full equity curve |
| Trades | Every trade, entry, exit, P&L, and why it opened and why it closed |
| Risk | Drawdown curve, VaR(95), expected shortfall, risk-adjusted metrics |
| Markets | Per-asset breakdown for dynamic strategies |
Each row carries the reason the trade opened and the reason it closed. That is how you discover that 80% of your exits were stop-losses rather than your exit condition, a fact no aggregate metric will tell you.
Pass / fail, separate from the grade
A result also carries a boolean pass against objective-aware thresholds:
| Objective | Min win rate | Min profit factor |
|---|---|---|
| intraday | 40% | Not enforced |
| positional | 40% | 1.2 |
Trade count is not gated. A failing result is shown in full with every metric. Nothing is hidden.
Multi-symbol and dynamic runs
Multiple symbols ("backtest this on ETH and BTC") runs the same strategy independently on
each, each with the full starting capital. Two standalone experiments, not a portfolio.
A dynamic strategy trades a universe: it evaluates every asset on each candle and trades the top-ranked ones. The Markets tab shows per-asset performance, useful for finding which instruments carried the result and which dragged.
These are different mechanisms and the distinction matters. See Dynamic & universe strategies and Backtest limitations
Next
- Reading results honestly, read this before deploying
- Strategy grades
- Fees & charges
- Backtest limitations