Skip to content

Run your first backtest

A backtest replays a strategy against historical price data and reports how it would have performed. JanusLab ships with a handful of built-in strategies so you can get a feel before writing your own.

Step by step

Backtests are launched from the Strategies page. There are two paths:

Path A — run a built-in strategy

  1. Open Strategies in the sidebar (or click Run Backtest on the Dashboard, which takes you here).
  2. Pick an implemented strategy — MACD Momentum is a good first run — and click Configure.
  3. Set the parameters:
    • 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.
    • Strategy parameters — EMA periods, stop-loss %, etc. (defaults are sensible).
  4. Hit Run backtest.

Path B — build your own, then run

  1. On the Strategies page click Create New Strategy (the no-code Builder).
  2. Compose entry/exit rules from indicators (see Strategies & Builder).
  3. Save it, then Run backtest from the builder's Backtest panel.

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

When the run finishes you're taken to the Dashboard, which shows the completed backtest:

  • Summary stats — a row of KPI cards: Total Return, Ann. Return, Win Rate, Max Drawdown, Capital, and Avg Deployment.
  • Charts — a tabbed panel with Equity, Compare, and Drawdown views, overlaying price plus buy ▲ / sell ▼ markers.
  • Trades table — every entry / exit with P&L, exportable as CSV / JSON.
  • Strategy parameters — the exact parameter set this run used.
  • Detailed Stats — open the bar-chart icon in the right-hand panel for Sharpe, Sortino, Profit factor, Expectancy, and more (see Backtesting → Detailed stats).
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 — go back to Strategies, re-open the strategy's Configure form, and change things like EMA periods or stop-loss %, then run again.
  • 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.