AI understands your idea. A calculator does the maths.
Language models are good with words and bad with numbers. So Strategy Lab splits the job: the AI only translates your question into exact rules, and a deterministic backtest engine produces every number.
You ask
In plain English, as you would ask a friend.
AI writes the rules
Your idea becomes a strict strategy spec: symbol, money, entry, exit, period.
Validator checks them
Wrong symbol or impossible rule? It goes back to the AI to fix, like a compiler error.
Engine runs day by day
Every trading day since the start: contributions, signals, trades, costs, interest.
You see and refine
Chart, XIRR, worst fall, every trade. Then ask a follow-up.
Your words
Start with ₹1 lakh in HDFCBANK. Buy when RSI(14) falls below 30, sell at +8% profit or -5% loss. Idle cash earns 6%, 0.2% cost per trade. Compare with buy and hold over the last 15 years.
Test it in the LabThe rules the engine runs
{
"title": "RSI oversold bounce: HDFCBANK",
"years": 15,
"cost_pct": 0.2,
"assumptions": [
"₹1,00,000 invested once; each trade uses all available cash",
"0.2% cost on every buy and every sell (STT, brokerage, exchange charges, stamp duty)",
"Cash waiting between trades earns 6% a year, like a liquid fund",
"Prices are daily closes; indices are price indices (no dividends), stock prices include dividends",
"Taxes are not deducted"
],
"strategies": [
{
"name": "Buy & hold",
"symbol": "HDFCBANK",
"contribution": {
"amount": 100000,
"every": "once"
},
"buy": {
"when": "on_contribution"
}
},
{
"name": "RSI oversold bounce",
"symbol": "HDFCBANK",
"contribution": {
"amount": 100000,
"every": "once"
},
"cash_interest_pct": 6,
"buy": {
"when": "signal",
"check": "daily",
"condition": {
"type": "rsi",
"days": 14,
"op": "<",
"value": 30
},
"amount": "all_cash"
},
"sell": {
"check": "daily",
"condition": {
"type": "any",
"conditions": [
{
"type": "position_return",
"op": ">=",
"value": 0.08
},
{
"type": "position_return",
"op": "<=",
"value": -0.05
}
]
},
"fraction": 1
}
}
]
}
Building blocks you can use
Mix and match these in one sentence.
The data
- 1,471 NSE stocks with market cap above ₹1,000 crore, daily closes adjusted for splits, bonuses and dividends
- 11 indices and ETFs: NIFTY50, BANKNIFTY, SENSEX, NIFTY100, NIFTY500, NIFTYMIDCAP50, NIFTYBEES, NIFTY200, NIFTYNEXT50, NIFTYMIDCAP150, NIFTYSMALLCAP250
- NIFTY 50 from 17 Sep 2007; most large stocks from 2005; prices up to 19 Nov 2026
- Indices are price indices (no dividends). For NIFTY with dividends, use NIFTYBEES
How the engine trades
- Uses daily closing prices; one position per strategy, which can be split into up to 4 parts
- Applies the cost you set (we use 0.2% per buy and per sell) and optional interest on idle cash
- Signals are checked daily, at week end or at month end, using only prices known on that day
- Reports final value, XIRR, maximum drawdown, trades, win rate and time invested
- Does not deduct taxes, and the stock list is today's (survivorship bias)