Skip to main content

Backtesting: Practise Trading on Historical Market Data

TradeLyser Backtesting lets you paper-trade on real historical candles replayed bar by bar. You start with virtual capital, place trades as the market unfolds, take notes, and review the results on a dedicated dashboard, without risking real money. It answers would my setup have worked on those days, and do I trade it the same way live?

Availability: Pro. Open it at app.tradelyser.com/backtesting/sessions, or choose Backtesting in the sidebar.

With Backtesting you can:

  • Replay stocks, futures, commodities, crypto, and index options on NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY, SENSEX and BANKEX.
  • Trade with Buy and Sell buttons while candles play at 1× to 10× speed.
  • Keep notes per session and get an AI review of a note.
  • Compare a backtest with your live trades in the same strategy.

Your sessions​

Backtesting home in TradeLyser listing sessions with total period backtested, session win rate, trade win rate and realised P&L

  • Summary cards show the total period you have backtested, session win % (sessions in profit), trade win % and total realised P&L.
  • Tabs filter All, Active, Completed and Archived sessions. Switch between table and grid view.
  • Each session's ⋯ menu lets you Open, Archive or Delete it.
  • The number of sessions you can keep depends on your plan, and archived sessions count towards it.

Step 1: Create a session​

Create Session form in TradeLyser Backtesting with session name, strategy, instrument type, symbol, dates and starting balance

  1. Click Create Session. Choose Historic Event to start from a Volatility Museum scenario, or Custom Session to pick your own dates.
  2. Enter a Session Name and an optional description. Optionally link a Strategy; you need this to compare the backtest with your live trades later.
  3. Choose the Type (Stocks, Options, Futures, Commodity or Crypto) and the Symbol.
  4. Choose the Start Date and End Date.
  5. For Options, pick the expiry and optionally the CE and PE strikes. Leave them on Auto (ATM) to use the at-the-money strike.
  6. For Commodity or Crypto, choose the Leverage. The helper text shows how large an adverse move would wipe out your margin. These are priced in USD.
  7. Choose a Starting Balance (₹50K to ₹1 crore, or type your own) and click Create Session.
Charts and contracts

Sessions open on a 1-minute chart; change the timeframe on the chart toolbar (1–60 minutes, daily, weekly or monthly). Futures sessions chart the underlying index. For options sessions before 2026, the CE and PE charts follow strikes by moneyness (ATM, ATM±1 and so on) on the current weekly expiry; from 2026 they use the exact contract you chose.

Step 2: Trade in the session​

Backtesting session workspace in TradeLyser with the replay bar, chart, order panel, orders and positions

AreaWhat it does
Replay barStep back, play/pause and step forward one candle. The speed slider runs from 1× (one candle per second) to 10×. Shows progress and unrealised P&L.
Quick Buy/SellEnter a quantity and click Buy or Sell.
Order panelBuy/Sell toggle, quantity and order type. Session Status shows current and available balance, locked capital or margin, and realised and unrealised P&L.
Orders / PositionsRecent orders, open positions with a close button for each, and Close All.
JournalUp to 10 notes per session, saved automatically. Analyze runs an AI review of a note.

How orders are filled:

  • Every order fills at market, at the close of the current candle. Limit and trigger orders are filled at market too.
  • There are no automatic stop-loss or target orders. Close positions yourself when your exit level is hit.
  • An order in the opposite direction closes your existing position first (oldest first); any extra quantity opens a new position.
  • Your balance (or margin, when leveraged) must cover the order.
  • Progress is saved as you play. The session pauses after 5 minutes without activity and resumes where you left off when you reopen it.

Options sessions​

Options backtesting session in TradeLyser with Call, Underlying and Put charts and Call and Put order cards

  • Options sessions show three charts: Call, Underlying (the master timeline) and Put.
  • Use the Call and Put cards to choose a strike, see the premium, margin and lot size, set the number of lots, and Buy or Sell.
  • Options are buy to open: Sell closes a long position you already hold. Writing (shorting) options is not supported.

Step 3: Finish and save the session​

Always use Exit Session

While you trade, orders are stored in your browser. Click Exit Session when you stop. It shows a summary (trades, win rate, P&L, ROI and profit factor) and syncs your orders. If you close the tab without exiting, the orders stay unsynced and won't appear on the backtesting dashboard, analytics or reports until you reopen the session in the same browser and exit.

When the replay reaches the end date, the session is marked Completed and the trading buttons are disabled.

Step 4: Review your backtests​

Backtesting dashboard in TradeLyser with widgets for net P&L, win rate, profit factor, equity curve and calendars

PageWhat it shows
DashboardA customisable widget dashboard: net P&L, win rate, profit factor, expectancy, Sharpe, drawdown, equity curve, calendars, symbol and time performance and more. Choose one session or all, and use Edit Layout and Templates like the main dashboard.
AnalyticsPerformance per session, Strategy comparison, Risk (Sharpe, Sortino, Calmar, drawdown, CVaR, ulcer index and more), Symbols, and Comparison of a backtest with your live trades.
ReportsSummary charts of P&L, volume, win/loss, R-multiples, holding times and direction, with best and worst days.
NotesAll your session notes by session and date. Select a session before creating a new note.
The date range uses historical dates

The backtesting dashboard filters by the historical date of your simulated trades and defaults to the last 6 months. If you backtested 2020, widen the range to include 2020. Today P&L and Monthly P&L use today's real date, so they stay at zero for historical sessions.

Backtesting analytics in TradeLyser comparing session performance, strategy results and risk metrics

Compare a backtest with live trading​

  1. Link the session to a strategy when you create it.
  2. Tag your live trades to the same strategy in the Strategy Lab.
  3. Open Analytics → Comparison. It shows how far live results deviate from the backtest. A negative deviation means you did better live.

How to use it in your routine​

Once a month, test a new idea in Backtesting before trading it with real money, or replay a famous market day from the Volatility Museum. A good loop is: spot a leak in Trade Replays or Strategy Lab Coaching, write the fix as a rule, practise it in a session linked to that strategy, then check Comparison once you have live trades with it.

Troubleshooting Backtesting​

ProblemWhat to check
A session's trades are missing from the dashboardYou may have closed the tab without Exit Session. Reopen the session in the same browser and exit. Also widen the date range to the historical dates you traded.
Today P&L and Monthly P&L show zeroThey use today's real date, so they stay at zero for historical sessions.
My limit order filled at a different priceAll orders fill at market, at the close of the current candle.
I can't sell an option I don't holdOptions are buy to open. Writing options is not supported.
I can't create another sessionThe number of sessions depends on your plan, and archived sessions count. Delete sessions you no longer need.
The Comparison tab is emptyLink the session to a strategy and tag live trades to the same strategy.

Frequently asked questions​

Can I backtest NIFTY and BANKNIFTY options in TradeLyser?​

Yes. Options sessions are available for NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY, SENSEX and BANKEX, with Call, Underlying and Put charts.

Is TradeLyser backtesting automatic or manual?​

It is manual, bar-by-bar practice: candles replay and you place every trade yourself, like paper trading on a past market.

Can I use stop-loss orders in a backtest?​

No. There are no automatic stop-loss or target orders. Close the position yourself when your level is hit.

Does backtesting use real money?​

No. Each session starts with a virtual balance you choose.