DOCS · GET STARTED

Algoshastra documentation

Describe a strategy in plain English, see if it would have worked on real market data, verify whether the edge looks real, and — when you trust it — export it to your own broker. This page walks the whole loop, then covers verdicts, charges, risk controls, brokers and plans.

Where things stand today

Algoshastra is a strategy-verification platform: you build a strategy and backtest it on real historical NIFTY and SENSEX data with real Indian costs. There is no live-money trading on the platform. You export the verified strategy to run on your own broker account.

Overview

The platform is one loop with four stages:

  • Describe — type your idea in plain English; the AI (Shastra) turns it into a working, readable strategy.
  • Backtest — run it on real NIFTY & SENSEX history and get a one-sentence verdict plus the numbers behind it.
  • Verify — read the plain-English verdict and the numbers to judge whether the edge looks real.
  • Export — download runnable code and a setup guide for your own broker account.
STEP 1Describein EnglishSTEP 2Backteston real dataSTEP 3Verifythe edgeSTEP 4Exportto broker
The Algoshastra loop: every strategy flows through the same four stages.

New to algorithmic trading? Start with the plain-English guides in Learn — e.g. What is algo trading? and Is algo trading legal in India?

1. Describe it in English

Open the AI editor and describe the strategy. The AI compiles your plain-English idea into a validated strategy that runs in our sandboxed Python runtime — and shows you the generated code so there is no hidden behaviour.

PROMPT · IRON-CONDOR.TXT
> Sell weekly NIFTY iron condors
  at 15% from price, exit at 50%
  profit, stop at 1.5× credit.
Describe a strategy in plain English — the AI turns it into working, readable code.
> Sell NIFTY weekly strangles at 15-delta, exit at 50% profit,
  stop at 1.5x credit, skip RBI announcement days.

The AI returns code you can read and edit, for example:

# Delta-neutral short strangle on NIFTY weekly
class ShortStrangle(Strategy):
    underlying = NIFTY
    expiry     = weekly()
    capital    = "₹12,00,000"

    risk = [
        HardSL(per_leg=-2.5),
        DailyLossCap(pct=-1.2),
    ]

    def on_bar(self, ctx):
        ...
Tip

Every AI message has a Generated code drawer so you can read the Python before you run it. You can also ask Shastra to tweak the logic in plain English and it edits the code for you.

2. Run a backtest

Hit Backtest in the editor. We run the strategy against historical 5-minute NIFTY and SENSEX bars and return a result you can actually read.

What you get back

  • The verdict — one of five plain-English labels (see below).
  • Equity curve — starting balance to end balance, with drawdowns annotated.
  • Trade ledger — every entry, exit and fill.
  • Charges breakdown — brokerage, STT, exchange fees and GST itemised.
start ₹10Lworst drawdownend balance
Illustrative equity curve — not a real or guaranteed result. Every backtest shows the worst dip, not just the headline number.
Honest disclosure

Today's backtest is an honest upper bound: it runs on a synthetic at-the-money option feed, so treat it as "is this worth trusting?", not a realised-return estimate. Per-contract, tick-accurate simulation is on the roadmap. Past or simulated results never guarantee future returns.

3. Verify the verdict

A backtest is only useful if you read it honestly. Before you export anything, verify it: read the plain-English verdict, then check the evidence behind it — the equity curve and worst drawdown, the full trade ledger, and the itemised Indian costs — and ask whether the edge is real or just a good-looking stretch of history.

Stress-test your assumptions: does the result still hold once realistic costs and slippage are counted? Are there enough trades to mean anything, or could it be luck? Only carry a strategy forward once its verdict is one you actually trust — the five verdicts below and our methodology explain exactly how each result is judged.

4. Export to your broker

When you trust a strategy, click Export. You get a bundle with the runnable code and a step-by-step setup guide for your own broker account. Your money and broker credentials stay with you — the exported strategy runs on your side.

EXPORT BUNDLE · NIFTY-SHORT-STRANGLE
  strategy.py          the runnable strategy
  requirements.txt     Python dependencies
  setup-groww.md       step-by-step run guide
  README.md            risk notes & checklist
Run it responsibly

An exported strategy places real orders with real money on your own account. Re-read the risk notes, start small, and never run anything you have not understood and verified first.

The five verdicts

Win-rate alone tells you nothing. Every backtest is translated into one of five plain-English verdicts, each backed by the full numbers:

  • A — Looks profitable with manageable risk. Positive returns, drawdown you could realistically sit through.
  • B — Profitable, but the drawdown is large. It made money, but the losing streaks will test you.
  • C — Marginally profitable. Could be luck. Thin edge; treat with caution.
  • D — Lost money over this period. The idea did not work on this data.
  • ∅ — Too few trades to draw a conclusion. Not enough signals to judge.
ALooks profitable with manageable risk.BProfitable, but the drawdown is large.CMarginally profitable. Could be luck.DLost money over this period.Too few trades to draw a conclusion.
Every backtest is translated into one of five plain-English verdicts — win-rate alone tells you nothing.

Read more about how we test in our methodology.

Charges & fees

Indian F&O has real frictions, and a backtest that ignores them is lying to you. Every backtest itemises the standard Indian options costs so the number you see is closer to what you would actually keep:

  • Brokerage — per executed order, per your broker's plan.
  • STT — Securities Transaction Tax on the sell side of options.
  • Exchange transaction charges — NSE / BSE per-trade fees.
  • GST — 18% on brokerage + transaction charges.
  • SEBI & stamp charges — small statutory levies.
BrokerageSTTExchangeGSTSEBI + stamp
Illustrative split of Indian F&O costs (brokerage, STT, exchange, GST, statutory). Exact rates vary by broker and regulation — every backtest itemises them.

Exact rates change with regulation and your broker, so treat the breakdown as an estimate, not tax advice.

Risk controls

Every strategy can attach risk controls that the engine enforces on each bar — the discipline that is hardest to keep by hand:

  • HardSL — a hard stop-loss per leg or per position; the engine exits the moment it is touched.
  • DailyLossCap — stop entering new trades once the day's loss hits your cap.
  • Target / profit exit — book at a set percentage of credit or premium.
  • End-of-day square-off — flatten intraday positions before close unless you opt to hold overnight.

These run identically in the backtest and your exported strategy, so what you verify is what you deploy.

Supported brokers

  • Groww — supported for export today.
  • Dhan, Zerodha & more — on the roadmap; export guides are added as each integration lands.

You always run exported strategies on your own broker login — Algoshastra never holds your funds or places trades on your behalf.

Plans & limits

Algoshastra is free to get started — the full AI builder and backtesting, no card required. Fair-use limits apply (number of saved strategies and AI turns) and scale with the plan you are on. See the public pricing page for the current breakdown.

Safety & compliance

  • Verification-focused. Strategies are verified on real historical data; no real orders are placed on your behalf.
  • Your money stays yours. We never hold funds; exported strategies run on your own broker account.
  • Not a SEBI-registered adviser. Algoshastra is a software tool, not investment advice. There is no live-money trading on the platform.
  • Read the risk disclosure. Options trading involves substantial risk — see the full risk disclosure.

FAQ

Do I need to know how to code?

No. You describe strategies in plain English; the AI writes the code and you can read or tweak it.

Is my money at risk?

Not on Algoshastra — there is no live-money trading on the platform. Money is only ever at risk if you export a strategy and choose to run it on your own broker account.

Is this legal in India?

Building and backtesting are fine. Live broker-API algo trading is governed by SEBI's 2025 retail-algo framework — read Is algo trading legal in India?

How much does it cost?

It is free to get started — no card. See pricing.

Ready to try it? Start free →

Backtest performance does not guarantee future returns.All trading involves capital loss risk.algoshastra is a strategy-verification platform, not a SEBI-registered adviser or broker.You are responsible for all trades placed on your broker account.Past performance is for educational reference only.Backtest performance does not guarantee future returns.All trading involves capital loss risk.algoshastra is a strategy-verification platform, not a SEBI-registered adviser or broker.You are responsible for all trades placed on your broker account.Past performance is for educational reference only.