Work · Fintech · Trading engine

Zerodha Bot

It started by obeying one script. Now it reads the market, picks its stocks, questions Claude and grades itself every night.

Role
Product, design and build
Team
Solo, with Claude Code as the engineering pair
When
September 2026, ongoing
Status
Backtest and paper. Live is locked

In one minute

What a trading bot is, if you have only traded by hand

Process · September to October 2026

Obedient, smart, smarter, smartest

Each level learned what the last could not do, built on top of it, and the tests kept count.

Built from scratch

A backtester that counts every rupee

Before a strategy touches money, it is replayed on years of old prices, with every Zerodha charge taken off, and then questioned.

The Pine Script builder

Got a new strategy? Paste it in. Two clicks, and it’s in the bot.

TradingView strategies are written in Pine Script, which only TradingView can run. So I gave the bot its own reader: paste the script, press Check, press Save.

Where the AI is

Claude advises. The bot decides. Every call is scored.

Claude reads the news; the bot reads prices. Claude gets exactly as much say as it has earned by being right.

One morning, replayed

The bot noticed something odd and asked, by itself

It holds TATAMOTORS. The stock opens 4.8% down. Nobody told the bot to ask; the gap did.

Constraints and decisions

Built to be trusted with money

Real money behind a phone, run by an owner who is not an engineer. Four decisions make that safe.

Outcome

The effort, measured

19 of 19
strategies rejected by my own gate
21
trading rules, each measuring what it costs or saves
5,300+
automated tests, in two weeks of building
0
live trades. Live stays locked until a strategy earns it

No profit and loss, usage or live result to show. There is none yet, and I would rather say so than show a number.

Its day

A day, as the bot lives it

Seven moments from its own screens. The owner should be able to guess what it is doing at any hour.

  1. 08:45

    It writes today’s plan

    Today's plan: the market in one line, Claude's note, which strategy runs on which stocks and why each was picked, and the control group of random stocks.
  2. 09:16

    Something odd: it asks Claude, by itself

    The bot asked at 09:16: TATAMOTORS opened 4.8% below yesterday's close, is there news? What the bot knew, and Claude's unsure answer: a recall in one market, size not confirmed.
  3. 10:16

    A trade closes at its target

    One trade in SBIN: entry at 09:42, the stop-loss and target from the bot's plan, the exit at 10:16 on target, and the profit after charges.
  4. 12:22

    Every open position carries its stop and target

    The Overview at 12:22: today's profit, funds, and three open positions, each with a bar from its stop-loss to its target.
  5. 16:31

    Every call Claude made is scored

    Claude's track record: right 57% of 238 calls in 90 days, each kind of call with how often it was right and the say it has earned, from Too early to No say: wrong too often.
  6. 19:00

    It picks tomorrow’s stocks, and grades itself

    The stock picker's sheet: its picks, a control group of random stocks, and its skill measured against them, with the verdict Too early, 34 of 60 trades.
  7. Saturday

    It reviews its week, and what it changed

    This week: the result, what the bot changed by itself (a re-tuned strategy, one of Claude's ideas added, one retired) and a proposal for the owner.

The bot’s own screens, from its test harness with made-up data

Looking back

Read the engine before drawing the screen. Half my complaints about the first interface were missing data, and a real browser run found six defects that 1,500 tests had passed.

Next: real days on paper before more cleverness. I built faster than I verified; a real paper week and a one-share live test come before anything gets a vote.