← cd ..
Algorithmic trading engine · NSEinternal

algotrader

An intraday trading system for Indian markets on Zerodha Kite — data, features, regime, strategy, risk veto, execution, journal and analytics — built to fail closed.

role
Architect & sole engineer
period
2026
3,400+
automated tests
2
live paper books
0
deps in the risk core

# the idea

Most retail bots lose money for boring reasons — perfect-fill assumptions, ignored costs, overfit backtests, no kill switch. This one makes the boring parts correct first.

# what I built

  • Full pipeline from live WebSocket ticks to orders, with a durable SQLite journal and reconciliation.
  • Risk layer with position sizing, the Indian cost stack and tax, dead-man and kill-switch halts that persist across restarts.
  • Backtesting with purged cross-validation to avoid look-ahead bias; paper-forward testing on separate stock and options books.
  • Web console and health endpoints; deployed on a GCP VM behind Caddy and Cloudflare with automatic morning token refresh.

# key decisions

  • Stdlib-first core — risk, sizing and the order state machine run with zero third-party dependencies.
  • Live routing is a guarded stub that refuses to trade without explicit enablement and a passed reconciliation.

# stack

  • Python
  • SQLite
  • WebSockets
  • Zerodha Kite
  • GCP
  • Caddy
  • systemd
next projectFacet→