TapeLeaf

Docs

Set up TapeLeaf and run your first backtest.

TapeLeaf is a remote MCP server. Add it to your AI client once, sign in with Google, then just talk about strategies.

Connect

Pick your client. The first time your agent uses TapeLeaf, it opens a Google sign-in. Your account starts with 10 free credits.

  1. In Claude (web or desktop), open Settings → Connectors.
  2. Choose Add custom connector, name it TapeLeaf, and paste this URL:
https://tapeleaf-api.onrender.com/mcp

Claude opens a Google sign-in the first time. Then start a new chat and ask for a backtest.

Your first backtest

Describe the trade in plain language. Your agent reads TapeLeaf’s instructions, asks about anything it needs (index, strikes, expiry, exits, dates), runs the test and reports progress while it works. Most runs finish in about a minute.

Prompts to try

  • Backtest a NIFTY 9:20 short straddle with a 40% stoploss, exit at 15:15, last three months.
  • Same strategy, but compare a 30% and a 50% stoploss.
  • Run it with charges off and last-price fills so I can see how much costs matter.
  • SENSEX iron condor at 9:30: sell 2 strikes out, buy 5 strikes out, 50% target. Show the daily P&L table.
  • Save this as “Morning straddle” and run it again over June instead.

What you can describe

Every strategy becomes a structured spec. Your agent writes it for you; this is what it can contain.

IndexNIFTY, BANKNIFTY, SENSEX, FINNIFTY or MIDCPNIFTY.
Legs1 to 8 option legs. Each is a buy or sell of a CE or PE, with its own lots.
StrikeDistance from the ATM strike at entry, in strike steps: ATM, 1 up, 2 down, up to 30 either way.
ExpiryThe nearest live expiry on each day (often same-day), or the next, up to 3 further out.
EntryA time of day (IST), applied to every trading day in the period.
ExitsStoploss % and target % on the position’s net premium, a squareoff time, or holding to the last bar. The first exit to trigger wins.
PeriodAny start and end date within the data coverage. Weekends and holidays are skipped.
CostsDiscount-broker charges (₹20 per order plus statutory charges), your own brokerage, or no charges. Bid/ask, mid or last-price fills, plus optional slippage.

What comes back

  • Net and gross P&L, with every charge itemised: brokerage, STT, exchange fees, GST, stamp duty and SEBI fees.
  • Day statistics: winning and losing days, win rate, average win and loss, max drawdown, profit factor and daily Sharpe.
  • Daily P&L for every trading day. Your agent shows the full table, with a running total, for runs up to about 40 days.
  • Every fill your strategy made: time, strike, side, quantity, price and why it exited.

Results are kept forever. Ask your agent for past runs any time.

Fills and charges

By default, TapeLeaf buys at the ask and sells at the bid at the minute your rule fires. Every order pays brokerage plus the statutory charges at current published rates. SENSEX contracts use BSE exchange fees and the others use NSE’s.

To see how much costs drag a strategy down, ask for the same run with charges off and last-price fills. Treat those numbers as optimistic: real trades pay the spread.

Data coverage

Minute-level option chains for every listed strike, with bid, ask and last price.

IndexHistory fromExchange
NIFTY25 Aug 2022NSE
BANKNIFTY28 Apr 2026NSE
FINNIFTY28 Apr 2026NSE
MIDCPNIFTY28 Apr 2026NSE
SENSEX28 Apr 2026BSE

New sessions are added every trading day. Your agent can check the latest available date and real expiry dates before it runs anything.

TapeLeaf returns results only. Candles, option chains and ticks are not available through any tool or export.

Save, organise, share

  • Save a strategy by name. Saving again under the same name creates a new version.
  • Re-run a saved strategy over a different period. The same strategy over the same dates returns instantly, free.
  • Workspaces group related strategies and can be shared with other TapeLeaf users by email.
  • Share links make a read-only public page for one strategy or one result. They’re only created when you ask.

Current limits

The following are not yet supported. Your assistant will say so if a request depends on one of them.

  • Entries are by time of day only. No indicator or signal entries yet.
  • One position per day, and all legs use the same expiry.
  • Weekly and monthly expiries aren’t distinguished yet. Expiries are picked by their order among the live ones.
  • Futures legs aren’t simulated yet.
  • Percentage exits apply to the whole position’s net premium, not per leg. They don’t trigger on near-zero-premium balanced spreads.
  • Holding to expiry currently squares off at the last bar of the session.

TapeLeaf does not offer live trading, paper trading or scheduled runs.