Run your first backtest¶
A backtest replays a strategy against historical price data and reports how it would have performed. AlgoTrader ships with a handful of built-in strategies so you can get a feel before writing your own.
Step by step¶
- Open Backtests in the sidebar, then New backtest.
- Strategy: pick one — MACD Momentum is a good first run.
- Symbol: type a ticker (e.g.
INFY,RELIANCE,NIFTY 50). - Date range: leave the default (last 12 months) or pick your own.
- Capital: starting capital, default ₹1,00,000.
- Hit Run.
The first run on a new symbol fetches data from Kite — expect 1-2 seconds. Subsequent runs use the local cache and complete in milliseconds.
Reading the result¶
You land on the result detail page with four panels:
- Equity curve — how your capital evolved over the run.
- Trade list — every entry / exit with P&L, slippage, brokerage.
- Summary stats — total return, annualised return, max drawdown, Sharpe, win-rate.
- Chart — price + indicators + buy/sell markers, zoomable.
Costs model
The default cost model uses flat-rate brokerage (0.1%) + slippage (0.05%) per side. This matches the discount-broker norm but isn't a literal Zerodha tariff — for the latter we'll have an explicit "Zerodha charges" option soon.
Next steps¶
- Tweak the strategy parameters — open the backtest detail page, click Re-run with parameters to change things like EMA periods, stop-loss %, etc.
- Compare two runs — the Compare page puts two backtests side by side.
- Optimize — the Optimizer runs a grid search across a parameter range.
- Paper trade the strategy — if backtest looks promising, the next step is paper trading before risking real money.