Backtesting for AI agents · NSE · BSE · MCX

Rehearse the strategy before it goes live.

Your agent writes the Python. bckstage runs it on Indian tick data in a private sandbox and hands the results back to Claude, ChatGPT or Cursor.

Create account

Free during early access · 5,000 credits to start

2020NSE ticks from
517instruments
₹1a sandbox minute

A real run

Backtest a 9/21 EMA crossover on Nifty near-month futures, 1-minute bars, 26 to 28 October 2026. Cross the spread and fill on the next bar.

ema_cross_nifty_v1 · 3 days of Nifty futuresstandard engine
Return−5.83%
Max drawdown−7.98%
Trades53
See the code your agent sends
Python, run with the exec tool
from bt import costs, data, engine, fills, results

class EmaCross:
    """Long when the fast EMA is above the slow EMA, short when below. 1 lot."""

    def on_bar(self, ctx, bars):
        p = ctx.params
        h = ctx.history("NIFTY-I", p["slow"] * 3)
        if len(h) < p["slow"]:
            return
        fast = h["close"].ewm(span=p["fast"]).mean().iloc[-1]
        slow = h["close"].ewm(span=p["slow"]).mean().iloc[-1]
        target = 1 if fast > slow else -1
        diff = target * ctx.lot_size("NIFTY-I") - ctx.position("NIFTY-I")
        if diff and not ctx.open_orders():
            ctx.order("NIFTY-I", qty=diff)

bars = data.bars(["NIFTY-I"], start="2026-10-26", end="2026-10-28", timeframe="1min")
run = engine.run(EmaCross(), bars,
                 fill=fills.Fill(price="touch", timing="next_bar"),
                 costs=costs.NSECosts(),
                 capital=500_000, params={"fast": 9, "slow": 21})
results.save("ema_cross_nifty_v1", run)

Finding out it loses costs a few minutes of sandbox time, not real money.

How it works

Two steps from you, then your agent does the rest.

  1. 1

    Connect your agent

    Paste one address into Claude, ChatGPT, Cursor or any agent that speaks MCP.

  2. 2

    Sign in once

    Your browser opens once. The first sign-in creates your account, with 5,000 free credits.

  3. 3

    Ask

    It finds the data, shows you the price before buying any, runs the backtest and reports back.

The data

Every contract that traded, including ones that have since expired. Ticks every 1 to 2 seconds with the best bid and ask, and bars of any size from 1 second up.

Choose instruments and see the price →

NSE futures and options300

1 Feb 2020 → 19 Nov 2026 · 1,688 trading days

BSE futures and options190

2 Jun 2025 → 29 May 2026 · 246 trading days

MCX commodities27

2 Jun 2025 → 18 Nov 2026 · 370 trading days

What you’d otherwise build yourself

An agent’s own sandbox can run a backtest too, if you bring the data and build the engine each time.

Data that is already cleaned up

Actual traded prices, lot sizes and expiry dates from the exchanges’ own files, and symbols that follow a company through a rename.

Sessions that remember

Your data stays loaded between messages, conversations and days. A session pauses when idle and wakes on the next call.

One tested engine

Indian charges, whole-lot orders, expiry settlement and no look-ahead. You choose the fill price and timing; nothing is assumed for you.

A record of every run

Each saved run keeps its code, data version and metrics, so two versions of a strategy can be compared months apart.

Any agent

bckstage is a standard MCP server. Whatever agent you use next year will work with it too.

Plain limits

A backtest is not the market. Where results here can differ from real trading.

What it costs

Free during early access. A new account starts with 5,000 credits: a year of Nifty futures, options within 5 strikes and spot costs ₹1,695 of them, and the rest runs a sandbox for about 55 hours. When you need more, you ask.

Sandbox time

₹1 a minute

8 GiB, 2 processors. Paused after 10 idle minutes, free while paused.

Data, an instrument a day

₹0.25–2

Longer runs cost up to 70% less per day.

See full pricing