Work · Autonomous system

Alphie

An AI-traded sleeve inside deterministic rails, on NSE stocks.

Status
Live
Years
2026 to present
Links
trades.nikhilpatil.in · Trade Lab · @indienik.trades

What it is

Claude trades a discretionary sleeve of NIFTY 50 stocks from a small GCP VM. A single session runs each trading day, resumed once a minute from 09:15 to 15:15 IST, carrying the whole day in memory; it reads the tape, its own rolling record and the day's rails, then manages at most one bracket trade: a stop 0.7% from entry, and once the trade is 0.2% in profit a trailing stop arms and tightens toward the price every five seconds. Server-side code bounds every number it picks: notional per trade, one position at a time, trades per day, a daily loss halt and a cumulative kill switch that only I can reopen. The backtested gap-fade strategy Alphie started as still runs its whole pipeline each morning, on paper only, so its evidence keeps accruing without money on it.

What was hard, or unusual

  • The model picks the trade, tested code picks the limits. Rails run server-side and fail closed, so a session that wants more cannot argue its way past them.
  • Every session closes itself: a data snapshot committed to the repo, an emailed brief, and a critique written by a scheduled Claude Code routine. The evidence loop runs whether or not I read it.
  • Gap fade was demoted to paper rather than deleted, so its shadow experiments keep scoring against simulated fills while the sleeve carries the risk.
  • Every trading day at four the day becomes a short reel on Instagram, built only from the committed journal and ledger. Gemini writes the plain-words copy, Lyria sings it, GitHub Actions renders it, the VM posts it. No screenshots, no typed numbers, and no post on a holiday.
  • Trade Lab is a public companion where anyone can test a strategy on NSE stocks. You pick the levers (when to trade, which stock, which side, how to exit, stops and trailing stops) and it recalculates in the browser, on one year of one-minute bars for the NIFTY 100, costs included. A slice of the data is sealed: never shown, used once per idea as the final test, with an append-only record of submissions. It is a static site and touches nothing in the live trading system. Built in a day, in public.

Stack

PythonFastAPIAPSchedulerZerodha KiteFlutterFirestoreGeminiLyriaClaude CodeGCPGitHub ActionsInstagram API