# Quant Whisperer
Terminal-native algorithmic trading execution engine built in Go with local-first AI inference, deterministic execution controls, and SQLite-backed paper/live trade history.
Tagline: "A hedge fund on your local machine. BYOB."

zerodha, dhan, and ib payload shapes.qwen3:0.8b default).{"action":"BUY|SELL|HOLD","confidence":0.0,"reasoning":"brief string"}
decisionspaper_tradeslive_tradespnl_historyThe current broker adapters include schema normalization and deterministic order flow hooks, while market data/order execution are simulated for local development. This keeps the architecture broker-ready without exposing API credentials externally.
go mod tidy
go run . paper --broker zerodha --symbol NIFTY50 --max-ticks 120
go run . paper [flags]go run . live [flags]go run . run --mode paper|live [flags]go run . tui --mode paper|live [flags]Useful flags:
--broker zerodha|dhan|ib--symbol NIFTY50--db quant_whisperer.db--confidence-threshold 0.85--max-drawdown 3--max-trades-per-minute 3--position-size 10--capital 100000--tick-interval-ms 1000--max-ticks 120--strategy-file .\strategy.txt--ollama-url http://localhost:11434--ollama-model qwen3:0.8b--cloud-fallback--cloud-provider openai|anthropic|deepseek--cloud-model gpt-4o-mini--cloud-api-key <key>--log-format text|jsonSet credentials in local environment variables:
ZERODHA_API_KEY, ZERODHA_API_SECRET, ZERODHA_ACCESS_TOKENDHAN_API_KEY, DHAN_API_SECRET, DHAN_ACCESS_TOKENIB_API_KEY, IB_API_SECRET, IB_ACCESS_TOKENCloud fallback (optional):
QW_ENABLE_CLOUD_FALLBACK=trueQW_CLOUD_PROVIDER=openai (or anthropic, deepseek)QW_CLOUD_MODEL=gpt-4o-miniQW_CLOUD_API_KEY=...Create a plain text strategy file and pass it into runtime prompts:
Look for mean reversion after a sharp intraday drop with volume spike confirmation.
Run with:
go run . paper --strategy-file .\strategy.txt
go test ./...
$ claude mcp add quant-whisper \
-- python -m otcore.mcp_server <graph>