Kestrel

A paper-first trading desk with a risk engine, audit trails and an installable PWA.

PythonFastAPIReactPostgreSQLTypeScriptPWA

Project overview

Kestrel combines market analysis, a breakout-and-retest strategy, a risk engine and an optional AI veto. Its FastAPI backend and React PWA expose strategy checks, trading controls and audit history. Paper and live execution share the same strategy pipeline through different exchange adapters; live mode has explicit readiness gates.

What it does

Risk before execution

  • Position sizing, loss limits and cooldowns
  • Readiness gates and a kill switch

Explain decisions

  • Visible long and short strategy checks
  • Trade, risk and AI audit records

One application, multiple views

  • React PWA with charts and mobile layouts
  • Backtests, performance and system status

Technologies & implementation

Technology stack

  • Python · FastAPI · asyncio
  • PostgreSQL · SQLAlchemy · Alembic
  • React · TypeScript · Vite
  • Lightweight Charts · PWA
  • Binance adapters · optional OpenAI integration
  • Docker · Caddy in the original deployment