NIFTY — · BANKNIFTY — · FINNIFTY — · INDIA VIX — · USD/INR — · REGIME FLAT dwell 2099 · adx 36.4 KILL SWITCH OFF — ARM NIFTY — · BANKNIFTY — · FINNIFTY — · INDIA VIX — · USD/INR — · REGIME FLAT dwell 2099 · adx 36.4 KILL SWITCH OFF — ARM
Kyoto
An options desk, engineered
Live · NSE · 京 2026

Alpha is engineered,
not discovered.

A field manual for nine MCP servers placing defined-risk options trades on Indian indices under one unforgiving SEBI risk gate. Read the tape. Compute volatility. Weigh open interest. Structure the trade. Ask permission. Route. Journal.

Kyoto · paper desk LIVE · TICK ≤5s
NIFTY · spot
23,635.60
+99.40 (+0.42%)
Regime · NIFTY
FLAT
dwell 2099 · adx 36.4 · bias bullish
iv_rank 51 · compression false
Open position · wide_iron_condor · NIFTY 2026-06-16
22900 PE · 23150 PE · 23750 CE · 24000 CE
Credit ₹2,38,781 · Spot in zone · computing…
9-server mesh
9 / 9 healthy
Pre-trade SEBI gate
18 / 18 checks
ELM · margin · greeks · OI · STT · cost · vega · 11 more
Kill switch · OFF
9
MCP Servers
166
Registered Tools
4phases
Foundation → Edge
7stages
Trade Lifecycle
18checks
SEBI Pre-Trade Gate
I · The Thesis

Three premises, taken seriously.

A trading system is the sum of the assumptions it refuses to violate.

Premise 01

Volatility risk premium is the edge.

Implied volatility on Indian indices reliably trades at a premium to realised. Kyoto is biased — by design — toward systematically selling that premium through defined-risk structures. Not predicting direction.

Premise 02

The risk gate is the product.

A model that can place an order is not a trading system. A model that cannot place an order without passing eighteen SEBI-aware pre-trade checks — ELM, calendar margin, illiquid-strike guards, cost hurdle, vega event warning — is.

Premise 03

Composition beats monoliths.

Nine narrow servers, each fluent in one concern, expose tools through MCP. The language model orchestrates. Every server is independently deployed, individually testable, owned by a single phase.

II · Architecture

Nine servers, four phases.

Read top to bottom: data, then decision, then survival, then edge. Servers within a phase converse through Redis Streams; events between phases follow a small set of standardised contracts.

Phase 01 · Foundation See the market clearly Data layer
01 · :2001 · ✓ shipped

Market Data

spot · chain · candles · futures · WS feed

Upstox v3 REST + WebSocket. Protobuf-decoded ticks into Redis pub/sub + a `live_ticks` hypertable. Instrument-master ingester resolves ~96k NSE keys.

02 · :2002 · ✓ shipped

Volatility Engine

IV · greeks · skew · term · VIX regime

Newton-Raphson + Brent solver matched broker IV within 0.5%. 12 years of EOD IV across four indices. India VIX feed wired to `iv_history`.

Phase 02 · Decision Form a view, propose a trade Reasoning layer
03 · :2003 · ✓ shipped

OI Analysis

heatmap · PCR · max-pain · velocity · S/R · FII/DII

3-minute chain snapshots + 30-second synthetic interpolator (confidence ≥0.7). PCR, max-pain, velocity, support/resistance, institutional flow.

04 · :2004 · ✓ shipped

Strategy Builder

payoff · STT trap · greeks · margin · suggester

Cost-adjusted POP is PDF-weighted (chunk 2.6a) — near-spot mass dominates ranking, not far-tail grid points. Wide + narrow IC, iron fly, credit spread, calendar, vix-fade evaluators.

Phase 03 · Survival Be allowed to trade. Trade. Remember. Execution layer
05 · :2005 · ✓ shipped

Risk Manager

SEBI · ELM · kill switch · auto-triggers · dynamic capital

18 pre-trade checks — 12 prudential + 6 SEBI. `check_risk` writes a `sebi_compliance_snapshots` row on every invocation. Rolling-Sharpe capital allocation in v0.

06 · :2006 · ✓ shipped

Trade Executor

demo · paper · live · sandbox · unwind · OBI guard

Upstox v3 broker. Sandbox synthetic-fill for paper. LIFO partial-fill unwind. Order Book Imbalance guard (opt-in). Portfolio netting v0 (observation-only).

07 · :2007 · ✓ shipped

Trade Journal

entries · annotations · MtM · per-template attribution

Every fill writes a `journal_entries` row tagged with `strategy_template`. Per-minute MtM tick. Per-template P&L attribution feeds the EOD reflection agent.

08 · :2008 · ✓ shipped

News Sentinel

RSS · keyword classifier · FinBERT · institutional stream

SEBI + RBI + NSE feeds. Keyword classifier + INT8 FinBERT sidecar. Emits `events:institutional` stream at high/critical severity — wakes orchestrator out-of-band for emergency hedge.

Phase 04 · Edge Run the loop, refine the loop Orchestration · in-progress
09 · :2009 · ✓ shipped

Backtester

replay · attribution · per-template stats

Replays historical tick data through the same strategy + risk + executor pipeline. Per-strategy attribution, drawdown curves, Sharpe.

00 · :2000 · ⟳ paper-soak

Orchestrator

LLM agent loop · 4 trigger paths · EOD reflection

OpenRouter Gemma primary + Anthropic Claude standby. Four trigger paths: cron · continuous · regime-flip listener · event-driven (high-severity news). EOD reflection agent emits per-template recommendations at 15:45 IST.

III · The Trade Lifecycle

Seven stages, one round trip.

Every paper trade walks the same seven stages. The arrow points one way; the journal feeds the next loop.

01
Observe
Market data + OI + IV land in Redis
02
Classify
Regime mode + confidence
03
Structure
Strategy template picks legs
04
Gate
18 SEBI pre-trade checks
05
Execute
Upstox order, polled to terminal
06
Watch
MtM tick, OBI, adverse flow
07
Journal
Row + attribution feeds tomorrow
IV · The Nine Servers

Each server has one job.

Hover any card to see the tools that ship. Numbers in green are paper-soak live. Numbers in amber are gated on Phase L graduation.

S1 · :2001live

Market Data

Phase 01 · Foundation

Upstox v3 REST + WS. Tick persistence into Redis + Postgres hypertables. Instrument-master.

get_spot_price get_option_chain get_historical_candles get_futures_data
S2 · :2002live

Volatility Engine

Phase 01 · Foundation

Newton-Raphson + Brent IV solver. 12yr historical IV across four indices. India VIX → iv_history.

calc_iv get_greeks get_skew get_term_structure get_vol_regime get_iv_rank
S3 · :2003live

OI Analysis

Phase 02 · Decision

3-min chain snapshots + 30s synthetic interpolator. PCR, max-pain, OI velocity, S/R, FII/DII.

get_oi_heatmap get_pcr get_max_pain get_oi_velocity get_support_resistance get_fii_dii_data get_bulk_deals
S4 · :2004live

Strategy Builder

Phase 02 · Decision

Cost-adjusted POP, PDF-weighted. Range strategies (IC narrow + wide, iron fly), directional (credit spread), volatility (calendar, vix-fade, long-straddle), arbitrage (long-butterfly, long-box).

calc_payoff evaluate_iron_condor evaluate_wide_iron_condor evaluate_iron_fly evaluate_credit_spread evaluate_calendar long_straddle_index long_butterfly_index long_box_index suggest_strategy
S5 · :2005live

Risk Manager

Phase 03 · Survival

18 pre-trade checks. Drawdown auto-de-risk. Dynamic capital weights (opt-in). Kill switch.

check_risk calc_position_size calc_portfolio_risk trip_kill_switch re_enable_trading audit_feed
S6 · :2006live

Trade Executor

Phase 03 · Survival

Demo / paper / live. Sandbox synthetic-fill. LIFO unwind. OBI guard. Portfolio netting v0.

place_strategy place_multi_leg_strategy get_positions get_order_book square_off_all
S7 · :2007live

Trade Journal

Phase 03 · Survival

Per-fill row. Per-template attribution. Per-minute MtM. Annotation API.

log_trade get_journal annotate_trade get_pnl_summary close_trade
S8 · :2008live

News Sentinel

Phase 03 · Survival

RSS · webhook · keyword + FinBERT INT8. Emits institutional stream that wakes the orchestrator.

ingest_external_event classify_news get_recent_events alert_vol_event
S0 · :2000paper-soak

Orchestrator

Phase 04 · Edge

LLM agent loop. 4 trigger paths: cron · continuous · regime-flip · event-driven (S8 wake).

run_decision_loop get_loop_status cancel_loop submit_alert get_regime
V · Strategies

What we actually trade.

Plain-English read of every strategy template the platform knows. Each runs in its own worker; each obeys the same risk gate.

Range · IClive

Iron Condor

Bet on a quiet market

Sells two out-of-the-money options (one above, one below the current price) and buys two further-out options as insurance. Profits if NIFTY / BANKNIFTY stays inside the range until expiry. Used in calm or theta-harvest regimes.

Range · IFlive

Iron Fly

Bet on a pin at strike

A tighter, higher-credit version of the iron condor. Sells at-the-money options + buys protective wings. Best when implied vol is mid-range and the market is expected to pin near a level (often a NIFTY expiry day).

Directionallive

Credit Spread

Bet on a direction with a floor

Two-leg directional bet — sell one option, buy a further-out one — that defines maximum loss upfront. Fires when the regime classifier confirms a trend bias (bull-put when up, bear-call when down).

Vol · Calendarlive

Calendar Spread

Bet on rising volatility

Sells a near-expiry option and buys the same strike on the next-expiry. Profits when implied volatility rises and the front leg decays faster than the back leg. Long-vega play.

Vol · VIX-fadelive

VIX-spike Fade

Bet that fear reverts

When India VIX spikes >5% inside 15 minutes, sells a short strangle (with protective wings) on the index. Closes when VIX reverts halfway back to the day's open. Pure mean-reversion of the fear gauge.

Vol · Straddleshadow

Delta-neutral Gamma-scalp

Bet on big moves, either direction

Buys an at-the-money call + put together (a "straddle"). Profits whenever the index moves sharply — up or down. The platform continuously rebalances by trading futures to stay direction-neutral, so the only thing left to capture is the size of moves.

Arb · Butterflyshadow

Butterfly Arbitrage

Find slightly-mispriced strikes

Continuously scans option chains for three neighbouring strikes where the middle option is briefly overpriced versus its neighbours. The platform buys the wings, sells the middle (twice), and captures the small risk-free edge if the mispricing closes.

Arb · Boxshadow

Box-spread Arbitrage

Capture risk-free rate gaps

A four-leg structure (a call spread + a put spread on the same two strikes) acts as a synthetic short-term loan. When the market prices that loan at the wrong interest rate, the platform locks in the gap. Always closed before 14:30 IST to avoid the tax-on-exercise hit at expiry.

V.5 · How we keep it safe

Self-correcting defenses.

Nine layers between a strategy and a bad day. Each fires automatically; the operator sees the audit trail.

Defense · Marginlive

Margin gate (corrected)

No false alarms on defined-risk spreads

The margin kill-switch now compares actual exposure (margin used minus cash on hand) against the cap, not raw margin used. Credit-spread positions that look "over-leveraged" on paper but are fully cash-collateralised no longer trip the switch.

Defense · Bootlive

Broker-startup grace

Rebuilds don't trigger kill-switch

When a container restarts during market hours (an update or fix), the first 90 seconds of broker-init noise (network warm-up, token refresh) are ignored by the risk gate. Real errors are still logged; only the startup blips are silenced.

Defense · APIlive

API-noise suppression

Known-broken endpoints don't count

Some exchange endpoints return contract-error responses for option lookups by design. The platform now ignores those for kill-switch purposes — they're API gaps, not risk signals — while still recording genuine failures.

Defense · Stucklive

Strategy circuit-breaker

A stuck position can't burn the order cap

If a position needs the same adjustment three ticks in a row but every attempt fails, the platform freezes further adjustments on that one symbol. Other symbols keep trading normally. Protects against burning the regulator's 20-orders-per-hour cap on a single broken position.

Defense · Cachelive

Live price cache

Faster, more reliable mark-to-market

Live option prices stream from the WebSocket feed straight into a fast in-memory cache. Mark-to-market and pricing decisions now read the cache first, falling back to the exchange API only on a miss. Cuts latency and removes a class of intermittent errors.

Defense · Regimelive

Regime-confidence floor

No trades into a low-conviction regime

The risk gate now blocks any new position when the regime classifier's conviction sits below a floor — a single, universal backstop so a strategy can never open into an unclassified or borderline market, even if its own entry filter misses it.

Defense · Greekslive

Book-level Greek envelopes

Net delta / gamma / vega, capped portfolio-wide

Every leg now carries its live Greeks into the gate, which sums them across the whole book and blocks a trade that would push net delta, gamma, or vega past their envelopes — turning portfolio risk from a report you read after the fact into a hard pre-trade limit.

Defense · Sizinglive

Capital-aware position sizing

Strategies adapt to the account, not the other way round

Defined-risk structures now size themselves to the account's per-trade max-loss cap — an iron condor automatically narrows its wings to fit a small book and widens them on a larger one. The strategy adapts to the safety limit; the limit is never loosened to fit the strategy.

Defense · Prooflive

Backtest-validated graduation

Paper results must match the backtest before live

Before any strategy graduates from paper to live capital, its realised paper Sharpe must sit within one standard deviation of a walk-forward backtest baseline. A paper run that looks "too good to be true" on a thin sample is held back, not promoted.

VI · Trading Modes

Same code path. Different blast radius.

Three modes share the executor, risk gate, and journal. Only the broker connection and capital flag differ.

Demo

Synthetic broker

Pure local-sim fills. No external calls. Used for risk-pipeline regressions + chunk-3.4 demo.

  • Slippage model: chunk-3.5 baseline
  • Capital: virtual
  • SEBI gate: full pipeline
  • Journal: every fill, tagged demo
Paper

Sandbox broker round-trip

Routes through Upstox sandbox. Synthetic-fill on sandbox + slippage overlay. ₹5L paper seed.

  • Broker: api-sandbox.upstox.com
  • Capital: ₹5,00,000 seeded
  • SEBI gate: full pipeline
  • Journal: per-template attribution
Live

Production broker

Real Upstox account. Gated on R-G1..R-G8 paper-soak graduation. Live-confirm flow available.

  • Broker: api.upstox.com
  • Capital: tier-scaled
  • Live confirm: opt-in
  • Charge true-up: T+1 09:00 IST
VII · The Risk Gate

Eighteen refusals.

Every `place_strategy` is preceded by `check_risk` against the same legs in the same loop iteration. The router refuses the place tool until the gate clears.

cap_per_trade
cap_total_open
elm_margin
cash_balance
drawdown_floor
concentration
portfolio_greeks
correlation_15
liquidity
mwpl_ban
stt_trap
delta_oi_position
settled_cash
expiry_day_elm
calendar_margin
vega_event
cost_hurdle
institutional_event
This is engineering, not financial advice. Kyoto trades a paper account. Live trading requires graduation through eight R-G criteria and active SEBI registration. Past paper performance is not indicative of future returns.
VIII · Roadmap

Where we are.

Four phases. Three shipped. One in paper-soak. Phase L (live trading) is gated on R-G1..R-G8 staying green for 30 calendar days.

Phase 01 · Foundation

Data layer

100%
S1 + S2 shipped 2026-02
Phase 02 · Decision

Reasoning layer

100%
S3 + S4 shipped 2026-03
Phase 03 · Survival

Execution layer

100%
S5–S8 shipped 2026-04
Phase 04 · Edge

Orchestration

75%
S0 paper-soak 2026-05