MCP Server

Stratify

site.aeon-labs/stratify
Data & Analytics Finance & Investing Public & reachable MCP 2026-07-28

What this MCP does

Backtests NIFTY options strategies on real one-minute data and produces out-of-sample, walk-forward, cost, risk, and trade-level reports.

build_report
Creates a shareable report page for a backtest the user owns and returns its URL. The page carries the honesty panel, equity and drawdown curves, walk-forward folds, the gross-to-net breakdown, a month grid and the trade table, computed from the stored backtest. Use when the user asks for a report or something to share.
Input schema
{'type': 'object', 'required': ['backtest_id'], 'properties': {'format': {'enum': ['artifact', 'link', 'full'], 'type': 'string', 'default': 'link', 'description': "'link' (default) returns the hosted URL of the report page. 'artifact' returns the whole self-contained HTML document as well, which costs considerably more tokens. 'full' builds the full strategy report and returns its link: the strategy's rules in plain English, what it did to a given capital, every trade plotted on a zoomable NIFTY chart, the evidence panel and the capital curve. 'full' is rate limited."}, 'capital': {'type': 'integer', 'maximum': 100000000, 'minimum': 100000, 'description': "format 'full' only. Starting capital in rupees. It sets the report's OPENING view — the reader can change it in the page without a new report. Default 1,000,000."}, 'risk_pct': {'type': 'number', 'maximum': 100, 'minimum': 0.1, 'description': "format 'full' only. Size by RISK instead of margin: the percent of capital the trade is allowed to lose in its worst case (2 means 'risk 2% per trade'). Only works where the position has a bounded worst case — a naked short does not, and the call is refused with that reason rather than sized off a guess. Overrides deploy_pct."}, 'deploy_pct': {'type': 'number', 'maximum': 100, 'minimum': 1, 'description': "format 'full' only. Percent of capital used as margin on any one trade. Default 10."}, 'backtest_id': {'type': 'string', 'description': 'From a previous run_backtest.'}}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'bytes': {'type': 'integer'}, 'message': {'type': 'string'}, 'contains': {'type': 'object', 'additionalProperties': True}, 'document': {'type': 'string'}, 'mime_type': {'type': 'string'}, 'report_url': {'type': 'string'}, 'backtest_id': {'type': 'string'}, 'document_properties': {'type': 'object', 'additionalProperties': True}}, 'additionalProperties': True}
describe_coverage
What data is available: symbols, date range, resolution, structures, gates, biases, the cost model, and every known gap.
Read only
Input schema
{'type': 'object', 'properties': {}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'from': {'type': 'string'}, 'tier': {'type': 'string'}, 'symbol': {'type': 'string'}, 'resolution': {'type': 'string'}}, 'additionalProperties': True}
explain_methodology
How a result is produced: entry pricing, settlement, margin, slippage, the honesty rubric, and what each check can and cannot establish.
Read only
Input schema
{'type': 'object', 'properties': {'topic': {'enum': ['changelog', 'common_mistakes', 'contract_spec', 'costs', 'interpreting_results', 'intraday', 'liquidity', 'margin', 'overfitting', 'overview', 'sample_size', 'slippage', 'strategy_book', 'structures', 'validation', 'what_is_returned'], 'type': 'string'}}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'body': {'type': 'string'}, 'title': {'type': 'string'}, 'topic': {'type': 'string'}, 'topics': {'type': 'array', 'items': {'type': 'string'}}}, 'additionalProperties': True}
fetch
Fetch a document or backtest result by id, as returned by search.
Read only
Input schema
{'type': 'object', 'required': ['id'], 'properties': {'id': {'type': 'string'}}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'id': {'type': 'string'}, 'url': {'type': 'string'}, 'text': {'type': 'string'}, 'title': {'type': 'string'}, 'metadata': {'type': 'object', 'additionalProperties': True}}, 'additionalProperties': True}
get_backtest
Retrieve a previous backtest result by its id — honesty panel, equity curve and per-trade detail, exactly as first computed.
Read only
Input schema
{'type': 'object', 'required': ['backtest_id'], 'properties': {'detail': {'enum': ['summary', 'standard', 'full'], 'type': 'string'}, 'backtest_id': {'type': 'string'}}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'spec': {'type': 'object', 'additionalProperties': True}, 'trades': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': True}}, 'honesty': {'type': 'object', 'additionalProperties': True}, 'summary': {'type': 'object', 'additionalProperties': True}, 'report_url': {'type': 'string'}, 'backtest_id': {'type': 'string'}, 'detail_note': {'type': 'string'}, 'data_release': {'type': 'object', 'additionalProperties': True}, 'trade_detail': {'type': 'object', 'additionalProperties': True}}, 'additionalProperties': True}
list_backtests
The account's backtests, newest first, with id, date, trade count, net P&L and report URL. Answers a request for the most recent run, which list_strategies does not: that one returns only results that passed the evidence checks, ranked by consistency rather than by date.
Read only
Input schema
{'type': 'object', 'properties': {'limit': {'type': 'integer', 'default': 10, 'maximum': 50, 'minimum': 1}}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'note': {'type': 'string'}, 'count': {'type': 'integer'}, 'backtests': {'type': 'array', 'items': {'type': 'object', 'properties': {'name': {'type': 'string'}, 'n_trades': {'type': 'integer'}, 'created_at': {'type': 'string'}, 'report_url': {'type': 'string'}, 'backtest_id': {'type': 'string'}, 'net_pnl_rupees': {'type': 'number'}}, 'additionalProperties': True}}}, 'additionalProperties': True}
list_strategies
Strategies from THIS account's history that held up under out-of-sample and walk-forward checks, not merely ones that made money. Ranked by worst walk-forward fold — consistency, not size. Answers what has worked on this account so far without re-running anything.
Read only
Input schema
{'type': 'object', 'properties': {'limit': {'type': 'integer', 'maximum': 100, 'minimum': 1}, 'order': {'enum': ['consistency', 'health', 'pnl'], 'type': 'string', 'description': "'consistency' (default) sorts by worst walk-forward fold, then median fold. 'pnl' sorts by total P&L and is the ranking most likely to put an overfit at the top."}}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'note': {'type': 'string'}, 'count': {'type': 'integer'}, 'strategies': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': True}}}, 'additionalProperties': True}
my_feedback
Reports this account has filed, and where each one stands. Use it to answer 'did that bug I reported ever get fixed?'.
Read only
Input schema
{'type': 'object', 'properties': {}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'count': {'type': 'integer'}, 'items': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': True}}}, 'additionalProperties': True}
run_backtest
Backtest an Indian index option strategy on real 1-minute NIFTY options data. Returns P&L after real charges and slippage, return-on-margin, and an honesty panel: out-of-sample split, walk-forward folds, bootstrap interval, and a deflated Sharpe that accounts for how many variants you have already tried. Refuses windows too narrow to be meaningful, and reports no ratios below 30 trades. Two spec forms: a PRESET (structure + params) for the common shapes, or an OPEN STRATEGY (legs + rules) for anything else — any number of legs at any strikes on any expiry, strikes chosen by percent, points, premium or delta, entry at any minute, and rules that CHANGE the position while it is live (roll a tested leg, close one side, add a hedge, trail a stop) plus book-level rules like standing down after three losers. Nothing here is restricted by tier; a paid tier only widens the date window.
Input schema
{'type': 'object', 'required': ['spec'], 'properties': {'lots': {'type': 'integer', 'maximum': 100, 'minimum': 1}, 'spec': {'oneOf': [{'type': 'object', 'required': ['structure', 'params'], 'properties': {'bias': {'type': 'string', 'description': "Chooses the side each cycle for directional structures. 'neutral' to use a fixed direction instead."}, 'gate': {'type': 'string', 'description': "Entry filter; 'always' to disable."}, 'params': {'type': 'object', 'properties': {'sl_pct': {'type': 'number', 'maximum': 1, 'exclusiveMinimum': 0}, 'tp_pct': {'type': 'number', 'exclusiveMinimum': 0}, 'sl_mult': {'type': 'number', 'exclusiveMinimum': 0}, 'direction': {'enum': ['CE', 'PE'], 'type': 'string'}, 'entry_dte': {'type': 'integer', 'maximum': 45, 'minimum': 0}, 'pct_width': {'type': 'number', 'maximum': 20, 'minimum': 0}, 'pct_offset': {'type': 'number', 'maximum': 20, 'minimum': 0}, 'entry_days_before': {'type': 'integer', 'maximum': 30, 'minimum': 0, 'description': "Entry day as TRADING SESSIONS before expiry (0 = expiry day, 2 = 'T-2'), instead of calendar entry_dte. Set one or the other."}}, 'description': 'Structure parameters. pct_offset and pct_width are percent of spot. sl_mult is a multiple of the credit received; sl_pct and tp_pct are fractions of premium paid. entry_dte is days to expiry at entry. direction is CE or PE for directional structures, and must be omitted when a bias is set.'}, 'period': {'type': 'object', 'properties': {'to': {'type': 'string'}, 'from': {'type': 'string'}}, 'description': 'YYYY-MM-DD, inside 2025-07-01 to 2026-06-30.', 'additionalProperties': False}, 'symbol': {'enum': ['NIFTY'], 'type': 'string', 'description': 'Free tier serves NIFTY only.'}, 'cadence': {'enum': ['weekly', 'daily'], 'type': 'string', 'description': "'weekly' (default) enters ONCE per expiry, on the day matching entry_dte — about 58 trades a year. 'daily' enters EVERY trading session on whichever expiry is nearest — about 246. Use 'daily' for anything described as 'every day'."}, 'max_dte': {'type': 'integer', 'maximum': 45, 'minimum': 0, 'description': "cadence 'daily' only: skip sessions where the nearest expiry is further out than this. max_dte 0 is expiry-day only."}, 'overlay': {'type': 'string', 'pattern': '^vol[0-9]{1,3}$', 'description': "Volatility filter: 'vol20' skips a cycle when the index's 20-day realised volatility is above 20% at entry. Omit for none."}, 'exit_time': {'enum': ['09:15', '09:30', '11:00', '12:00', '12:30', '13:00', '14:00', '15:00', 'EOD'], 'type': 'string', 'description': 'IST clock exit — squares the position off the SAME session, so it never reaches expiry. Omit to hold until a stop, a target or settlement. Must be after entry_time. Set this to express an intraday round trip such as in at 11:00, out at 14:00.'}, 'structure': {'enum': ['credit_spread', 'iron_condor', 'iron_fly', 'long_option', 'short_strangle'], 'type': 'string', 'description': 'Option structure to trade.'}, 'entry_time': {'enum': ['09:15', '09:30', '11:00', '12:00', '12:30', '13:00', '14:00', '15:00', 'EOD'], 'type': 'string', 'description': 'IST. EOD is 15:29, the last tradeable minute.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['legs'], 'properties': {'exit': {'type': 'object', 'properties': {'time': {'type': 'string', 'description': 'hard square-off at this minute on the entry day.'}, 'when': {'type': 'object'}}, 'additionalProperties': False}, 'legs': {'type': 'array', 'items': {'type': 'object', 'required': ['side', 'type', 'strike'], 'properties': {'qty': {'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'lots of THIS leg relative to the others. Unequal quantities are how a ratio spread is written.'}, 'side': {'enum': ['sell', 'buy'], 'type': 'string'}, 'type': {'enum': ['CE', 'PE'], 'type': 'string'}, 'label': {'type': 'string'}, 'expiry': {'enum': ['near', 'next', 'far'], 'type': 'string', 'description': "'near' is the nearest expiry at entry; 'next' is the one after, which is how a calendar or diagonal is written."}, 'strike': {'description': 'How to pick the strike. One of: {"pct_offset": 1.0} percent from spot (negative for puts) | {"points_offset": 200} | "atm" | {"strike": 24000} | {"premium_near": 50} the strike whose last real print is nearest 50 points | {"delta_near": 0.20} | {"from_leg": {"leg": 0, "pct": 0.5}} relative to another leg. Add {"ref": "entry"} to measure from the spot at entry rather than the spot now.'}}, 'additionalProperties': False}, 'maxItems': 12, 'minItems': 1, 'description': 'What to open. Leg order defines the indices rules use.'}, 'name': {'type': 'string'}, 'entry': {'type': 'object', 'properties': {'dte': {'type': 'integer', 'maximum': 60, 'minimum': 0, 'description': 'weekly/monthly only: days before expiry to enter. Defaults to 4 weekly, 21 monthly.'}, 'time': {'type': 'string', 'description': "ANY minute of the session, e.g. '09:20'. Not a grid."}, 'when': {'type': 'object', 'description': 'Optional gate on the cycle — the REASON for taking the trade. combined_premium is the credit on offer, so {"combined_premium": {"gte": 80}} means \'only if I collect 80 points\'. Market state is here too: day_of_week, gap_pct, prev_day_move_pct, realised_vol_20d, vix, vix_change_pct, vix_prev_close. e.g. {"vix": {"gte": 15}}, {"prev_day_move_pct": {"lte": -1}}, {"day_of_week": {"eq": 1}} for Mondays. INDEX INDICATORS too, computed on closes up to YESTERDAY: rsi_N (0-100), close_vs_sma_N_pct and close_vs_ema_N_pct (per cent above/below the N-day average), ema_F_vs_S_pct and sma_F_vs_S_pct (fast against slow, positive = fast is above). N from 2 to 250. e.g. {"rsi_14": {"lt": 30}} for oversold, {"close_vs_ema_50_pct": {"gt": 0}} for \'above the 50-day\', {"ema_9_vs_21_pct": {"gt": 0}} for a 9/21 crossover. All are knowable before the session — none can see the day\'s own close.'}, 'cadence': {'enum': ['weekly', 'daily', 'monthly'], 'type': 'string', 'description': 'weekly = one entry per weekly expiry; monthly = one per monthly expiry (the last of its calendar month); daily = one per session.'}, 'max_dte': {'type': 'integer', 'maximum': 60, 'minimum': 0, 'description': 'daily only: skip sessions further than this from expiry.'}}, 'additionalProperties': False}, 'rules': {'type': 'array', 'items': {'type': 'object', 'required': ['when', 'then'], 'properties': {'then': {}, 'when': {'type': 'object'}, 'label': {'type': 'string'}, 'max_times': {'type': 'integer', 'maximum': 100, 'minimum': 1}}, 'additionalProperties': False}, 'maxItems': 24, 'description': 'Checked every minute, in order; the first match fires. Fields: adjustments_done, combined_premium, credit_kept_frac, day_of_week, drawdown_from_peak, dte, gap_pct, leg_mark, leg_mark_delta, leg_mark_mult, leg_pnl_pts, minutes_held, pnl_frac_of_credit, pnl_frac_of_max, pnl_pts, pnl_rupees, prev_day_move_pct, realised_vol_20d, runup_from_trough, spot, spot_beyond_strike, spot_move_pct, spot_move_pts, time, vix, vix_change_pct, vix_prev_close. Actions: "close" | {"close_legs": [0]} | {"open": [leg,...]} | {"roll": {"legs": [0], "to": strike}} | {"close_and_open": {"close": [0], "open": [leg]}}.'}, 'period': {'type': 'object', 'properties': {'to': {'type': 'string'}, 'from': {'type': 'string'}}, 'additionalProperties': False}, 'symbol': {'enum': ['NIFTY'], 'type': 'string'}, 'portfolio': {'type': 'object', 'properties': {'max_trades': {'type': 'integer', 'minimum': 1}, 'skip_after_loss': {'type': 'boolean'}, 'stop_after_losses': {'type': 'integer', 'minimum': 1}, 'stop_after_profit_pct': {'type': 'number'}, 'stop_after_drawdown_pct': {'type': 'number'}}, 'description': 'Rules over the SEQUENCE of trades, which no per-trade condition can express.', 'additionalProperties': False}, 'resolution': {'enum': [1, 5, 15], 'type': 'integer', 'description': 'minutes per rule check. 1 is the default and the honest one.'}, 'max_adjustments': {'type': 'integer', 'maximum': 50, 'minimum': 0, 'description': 'how many times the rules may change the position in one trade. Default 4.'}}, 'description': 'An open strategy: any legs, any rules. Covers what the presets cannot say — ratio spreads, calendars, diagonals, jade lizards, broken wings, delta- or premium-selected strikes, per-leg stops, rolling a tested side, trailing stops, entry conditions on the credit available, and book-level rules like standing down after three losers.', 'additionalProperties': False}], 'description': 'Either a preset spec (structure + params) or an open strategy (legs + rules). Use the open form for anything the presets cannot say.'}, 'detail': {'enum': ['summary', 'standard', 'full'], 'type': 'string', 'description': "How much per-trade data to return. 'standard' (default) is the equity curve, breakdowns and the first 25 trades with their leg prices. 'full' returns up to 300 trades — ask for it when the caller wants to audit or chart every trade. 'summary' returns aggregates only, and is the cheapest to read."}}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'spec': {'type': 'object', 'additionalProperties': True}, 'quota': {'type': 'object', 'additionalProperties': True}, 'trades': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': True}}, 'honesty': {'type': 'object', 'additionalProperties': True}, 'summary': {'type': 'object', 'additionalProperties': True}, 'breakdown': {'type': 'object', 'additionalProperties': True}, 'report_url': {'type': 'string'}, 'backtest_id': {'type': 'string'}, 'methodology': {'type': 'object', 'additionalProperties': True}, 'cost_seconds': {'type': 'number'}, 'data_release': {'type': 'object', 'additionalProperties': True}, 'equity_curve': {'type': 'array'}, 'trade_detail': {'type': 'object', 'additionalProperties': True}, 'strategy_book': {'type': 'object', 'additionalProperties': True}, 'interpretation': {'type': 'object', 'additionalProperties': True}}, 'additionalProperties': True}
search
Search what this service covers — symbols, dates, structures, signals, methodology. Returns ids usable with fetch.
Read only
Input schema
{'type': 'object', 'required': ['query'], 'properties': {'query': {'type': 'string'}}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'results': {'type': 'array', 'items': {'type': 'object', 'properties': {'id': {'type': 'string'}, 'url': {'type': 'string'}, 'title': {'type': 'string'}}, 'additionalProperties': True}}}, 'additionalProperties': True}
submit_feedback
Files a bug report or feature request when the user asks to report something. Confirm the title and body with the user before filing. Passing backtest_id attaches that backtest's spec so the issue can be reproduced.
Input schema
{'type': 'object', 'required': ['title', 'body'], 'properties': {'body': {'type': 'string', 'maxLength': 4000, 'description': "What was expected, what happened, and any spec involved. Write it from the user's report, not from your own summary of it."}, 'title': {'type': 'string', 'maxLength': 160, 'description': 'One line naming the problem or request.'}, 'category': {'enum': ['bug', 'confusing', 'data_gap', 'feature_request', 'other', 'performance', 'praise', 'pricing'], 'type': 'string', 'description': 'Omit it and it will be inferred from the text.'}, 'severity': {'enum': ['blocker', 'idea', 'major', 'minor'], 'type': 'string'}, 'backtest_id': {'type': 'string', 'description': 'The result this is about, if any.'}}, 'additionalProperties': False}
Output schema
{'type': 'object', 'properties': {'note': {'type': 'string'}, 'status': {'type': 'string'}, 'message': {'type': 'string'}, 'category': {'type': 'string'}, 'severity': {'type': 'string'}, 'feedback_id': {'type': 'string'}}, 'additionalProperties': True}
Changed
my_feedback
Sept. 27, 2026, 2:50 a.m.
Changed
build_report
Sept. 27, 2026, 2:50 a.m.
Changed
submit_feedback
Sept. 27, 2026, 2:50 a.m.
Changed
fetch
Sept. 27, 2026, 2:50 a.m.
Changed
search
Sept. 27, 2026, 2:50 a.m.
Changed
list_strategies
Sept. 27, 2026, 2:50 a.m.
Changed
get_backtest
Sept. 27, 2026, 2:50 a.m.
Added
list_backtests
Sept. 27, 2026, 2:50 a.m.
Changed
explain_methodology
Sept. 27, 2026, 2:50 a.m.
Changed
describe_coverage
Sept. 27, 2026, 2:50 a.m.
Changed
run_backtest
Sept. 27, 2026, 2:50 a.m.
Added
my_feedback
Sept. 17, 2026, 12:55 p.m.
Added
build_report
Sept. 17, 2026, 12:55 p.m.
Added
submit_feedback
Sept. 17, 2026, 12:55 p.m.
Added
fetch
Sept. 17, 2026, 12:55 p.m.
Added
search
Sept. 17, 2026, 12:55 p.m.
Added
list_strategies
Sept. 17, 2026, 12:55 p.m.
Added
get_backtest
Sept. 17, 2026, 12:55 p.m.
Added
explain_methodology
Sept. 17, 2026, 12:55 p.m.
Added
describe_coverage
Sept. 17, 2026, 12:55 p.m.
Added
run_backtest
Sept. 17, 2026, 12:55 p.m.