Overview
Architecture
Agent-Debate, Risk-Veto Design
The Quality Gate
Backtest → Out-of-Sample Validation → Paper Trading → Risk Review
This mirrors a staged test-promotion pipeline (unit → integration → staging → prod) more than a typical trading bot's "backtest and go live" pattern — a deliberate choice to keep unproven strategies contained.
Data & Execution Layer
- Zerodha Kite Connect as the primary broker/data source for live NSE/BSE quotes and the options chain (no free options-chain data source exists, so options analysis requires an active Kite session)
- yfinance as an equities-only fallback for pre-login / no-session states
- Real-time index quotes migrated from HTTP polling to Kite's WebSocket ticker for lower latency
- Postgres + TimescaleDB for time-series storage, Redis for caching (Kafka planned for a later phase)
- Explicit, documented inter-agent JSON contracts (docs/SCHEMAS.md) so agents can be developed, tested, and replaced independently
Options Intelligence
Dashboard
Testing & Quality
- 64 tests across 10 pytest files covering Black-Scholes pricing, the risk-veto path, backtest look-ahead-bias checks, custom strategy logic, trading-mode switching, and each individual agent (options, mutual fund, stock advisor, strategy research, swing)
- Backtest bias checks specifically guard against look-ahead bias — a correctness class of bug that's easy to introduce and easy to miss in trading systems, and directly analogous to flaky-test root causes in E2E suites
Technologies Used
- Python 3.12, FastAPI — orchestrator backend (services/orchestrator)
- Next.js 16, React 19, TypeScript, Tailwind CSS 4 — dashboard
- Postgres, TimescaleDB, Redis — data layer
- Zerodha Kite Connect, yfinance — market data and broker integration
- pytest — test suite (64 tests, 10 files)
- lightweight-charts — dashboard charting