Building in public
I'm building an options trading bot in public. Every mistake included.
Since early 2026 I have been writing the software that trades Indian index options for me. This is the log: how it is built, what broke, and what it cost — written down so you can skip a few of my mistakes.
What you'll find here
- The journey — Month by month, what I built and what happened.
- Mistakes that cost me — The bugs, with the rupee figure attached.
- Best practices — The rules and guards I actually run, and why.
GPT vs Claude in a live trading bot: letting two AIs vote
I asked GPT and Claude to read the same Nifty chart thousands of times and made them vote on my trades. What I learned about using AI in a trading bot.
The journeyOpening range breakout on Nifty: I tested 25 versions
My first trading bot traded one classic idea, the opening range breakout. I built 25 versions of it on Nifty options. Here's what made the good ones good.
Latest posts
All posts →Start here
All guides →CPI at 6.09%: what breaching the RBI's 6% limit actually triggers
October 2026 CPI of 6.09% is above the RBI's 6% ceiling, but the law tests quarterly averages three quarters running. The rule, the arithmetic and the 2022 case.
GuidesMuhurat trading explained: what 11 Diwali sessions show
How the one-hour Diwali Muhurat session works, its 2026 timetable, and why the Nifty closed below its own opening price in 10 of the last 11 Muhurat sessions.
GuidesStandalone vs consolidated results: Trent's two Q2 profits
Trent's consolidated profit was ₹468 crore, below its standalone ₹490 crore, yet grew 25% against 8.6%. What each set of results counts, worked through.
GuidesWPI vs CPI: why wholesale inflation was 11.39% and retail 5.54%
India's wholesale inflation was 11.39% in September 2026 and retail inflation 5.54%. The baskets, the fuel gap and the services WPI leaves out, with the figures.
GuidesSEBI's closing auction rewrite: what changes on 7 December 2026
From 7 December, expiring F&O settles on a 30-minute VWAP and the closing auction moves to 3:30-3:40 PM. Old and new rules side by side, with the arithmetic.
GuidesWhy a share can fall on good results: Nestle India's Q2
Nestle India's profit rose 36.3% and its shares fell 7.76% the same day. What the results, the preview estimates and the prior week's prices show, step by step.
GuidesLTCG, STCG and STT: how a share trade is taxed in India
A worked example of the three taxes on a share trade in India: STT on the trade itself, and LTCG at 12.5% or STCG at 20% on the gain, with the arithmetic.
GuidesKite Connect historical data: fetching years of minute candles
Kite Connect returns 60 days of 1-minute candles per request. Going back to 2015 takes 72 requests. Here's the arithmetic and the Python loop.
GuidesWhat happens when a stock joins or leaves the Nifty 50?
The full Nifty 50 eligibility criteria, how NSE Indices picks changes, and what BSE's entry and Wipro's exit looked like in the volume data on the last day.
GuidesThe closing auction session explained: how F&O stocks close now
How NSE's closing auction sets the closing price of F&O stocks, why the last trade is no longer the close, and what changes on 7 December 2026.
GuidesWhat FII and DII data is and how to read the daily numbers
FII and DII tables show what foreign and domestic institutions bought and sold in the cash market: what each column counts, where NSE publishes it, its limits.
GuidesWalk-forward testing explained, with a worked example
Walk-forward testing re-picks a setting on past data and scores it on the next unseen block. A simulated 6-window example shows the gap it exposes.
GuidesWhat is India VIX and what does it measure?
India VIX is NSE's annualised volatility figure, built from Nifty option prices over 30 days. Here is how it is computed and how to turn it into a daily move.
GuidesStreaming live prices with the Kite Connect websocket in Python
A runnable Python script for Zerodha's Kite Connect websocket: subscribe, pick a mode, read a tick field by field, handle reconnects and shut down cleanly.
GuidesBrokerage, STT and slippage: what one trade really costs
A worked example of what a single Nifty options trade costs on Zerodha, charge by charge, and how those costs turn a small edge into a steady loss.
GuidesHow to backtest an intraday strategy without fooling yourself
The three ways a backtest lies: lookahead bias, ignored costs and overfitting. With pandas code, a coin-flip simulation, and a 68% backtest that won 20% live.
GuidesHow to place your first order with the Kite Connect API in Python
Place, check and cancel your first order with Zerodha's Kite Connect API in Python, after rehearsing it in a paper mode that sends nothing to the exchange.
GuidesThe pre-open session explained: how the 9:15 open price is set
How NSE's 9:00 to 9:15 pre-open auction sets each stock's opening price: the timetable since 7 September 2026, the tie-break rules and a worked order book.
GuidesProfit factor, payoff ratio and expectancy: a worked example
What win rate, payoff ratio, profit factor and expectancy mean, how they connect, and 20 made-up trades worked through in R, plus where small samples mislead.
GuidesWhat is GIFT Nifty, and how reliable is it as a guide to the open?
What GIFT Nifty is, who runs it, when it trades, how it relates to the Nifty, and the contract basics: size, dollar pricing, expiry and who can trade it.
GuidesZerodha Kite Connect: what it costs and whether it's worth it
What Kite Connect costs in 2026, what the free and ₹500 plans include, the rate and data limits you'll hit, and who the paid plan is worth it for.
GuidesZerodha Kite Connect: get your API key and refresh the token daily
A practical guide to getting a Kite Connect API key and handling the access token that expires at 6 AM each day, with scripted login and scheduling.
GuidesAlgo trading in India: the rules, the cost, and what to do first
What the law requires of a retail algo trader in India, what a system costs to run after the April 2026 STT change, and the order to build it in.
What this site is
Building an algo trading bot for Nifty options in public: the strategies, the code, the lessons, and how SEBI rules and broker APIs work in India. No tips, no calls, no returns — read the about page for exactly what I do and don't publish.