diff --git a/.planning/PROJECT.md b/.planning/PROJECT.md index eb76b991..8de4c3b9 100644 --- a/.planning/PROJECT.md +++ b/.planning/PROJECT.md @@ -23,11 +23,12 @@ These capabilities already exist in the codebase: - ✓ LLM client factory supporting OpenAI, Anthropic, Google — existing - ✓ CLI with Rich UI and interactive prompts — existing - ✓ Signal processing with 5-tier rating scale — existing +- ✓ Options chain data retrieval via Tradier API (chains, expirations, strikes, Greeks, IV) — Validated in Phase 1: Tradier Data Layer +- ✓ Tradier registered as vendor in data routing layer with rate limit fallback — Validated in Phase 1: Tradier Data Layer ### Active -- [ ] Options chain data retrieval via Tradier API (chains, expirations, strikes, Greeks, IV) -- [ ] Options chain data retrieval via Tastyworks API (streaming Greeks, real-time quotes) +- [ ] Options chain data retrieval via **Tastytrade** API (DXLink WebSocket streaming Greeks, real-time quotes; the broker was formerly marketed as *Tastyworks*) - [ ] Parallel options analyst team (runs alongside existing stock analysis) - [ ] Volatility analysis agent — IV Rank, IV Percentile, volatility skew, VRP, IV surface - [ ] Greeks analysis agent — Delta, Gamma, Theta, Vega + 2nd order (Charm, Vanna, Volga/Vomma) @@ -39,7 +40,7 @@ These capabilities already exist in the codebase: - [ ] Options portfolio manager — synthesizes all analysis into final recommendation - [ ] Output: specific contract recommendations (strikes, expirations, legs) + alternative ranges - [ ] Output: transparent reasoning chain showing why each strategy was selected -- [ ] TastyTrade methodology integration — 45 DTE entry, 21 DTE management, 50% profit target rules +- [ ] **Tastytrade** methodology integration — 45 DTE entry, 21 DTE management (close or roll per rules engine), 50% profit target rules - [ ] SpotGamma-style GEX calculation — net GEX across strikes, Vol Trigger, Call/Put Wall levels - [ ] MenthorQ-style composite scoring — Options Score (0-5), regime classification (long/short gamma) @@ -56,21 +57,21 @@ These capabilities already exist in the codebase: - TradingAgents v0.2.2 is a mature multi-agent stock analysis framework built on LangGraph - The existing architecture supports parallel agent teams — the options module plugs in as a new team -- Data layer already supports vendor routing with automatic fallback — Tradier and Tastyworks fit as new vendors +- Data layer already supports vendor routing with automatic fallback — Tradier and **Tastytrade** fit as new vendors - Agent factory pattern (create_*() closures) is well-established and should be followed - The codebase uses a 5-tier rating scale (BUY/OVERWEIGHT/HOLD/UNDERWEIGHT/SELL) - Tradier provides Greeks via ORATS (institutional quality, hourly updates) — yfinance has NO Greeks -- Tastyworks API provides real-time streaming Greeks via DXLink WebSocket +- **Tastytrade** API provides real-time streaming Greeks via DXLink WebSocket - MenthorQ has no public API — their methodology must be replicated using raw options data - SpotGamma API available at Alpha tier ($199+/mo) — methodology can be replicated from their published formulas -- TastyTrade's rules engine (IVR thresholds, DTE rules, profit targets) provides a proven decision framework +- **Tastytrade** rules engine (IVR thresholds, DTE rules, profit targets) provides a proven decision framework ## Constraints -- **Data providers**: Tradier (REST, 120 req/min, Greeks hourly) and Tastyworks (REST + WebSocket streaming) as primary options data sources +- **Data providers**: Tradier (REST, 120 req/min, Greeks hourly) and **Tastytrade** (REST + DXLink WebSocket streaming) as primary options data sources - **No 2nd-order Greeks from API**: Charm, Vanna, Volga must be calculated from 1st-order Greeks + Black-Scholes - **Architecture**: Must follow existing patterns — agent factory functions, vendor routing, LangGraph StateGraph -- **Python**: >=3.10, consistent with existing codebase +- **Python**: >=3.11 (baseline for the options module and the community **tastytrade** SDK in Phase 10; aligns with `requires-python` in `pyproject.toml`) - **LLM provider agnostic**: Options agents must work with any supported LLM provider via the client factory ## Key Decisions @@ -78,11 +79,11 @@ These capabilities already exist in the codebase: | Decision | Rationale | Outcome | |----------|-----------|---------| | New parallel team (not extending existing analysts) | Options analysis is domain-specific with unique data needs; clean separation allows independent development and optional activation | — Pending | -| Tradier + Tastyworks as data providers | Tradier provides ORATS-quality Greeks and IV; Tastyworks provides real-time streaming; both have Python-friendly APIs | — Pending | +| Tradier + Tastytrade as data providers | Tradier provides ORATS-quality Greeks and IV; Tastytrade provides real-time streaming; both have Python-friendly APIs | Phase 1 ✓ (Tradier) | | Replicate MenthorQ/SpotGamma methodology rather than subscribe | No public API from MenthorQ; SpotGamma API is expensive; core formulas (GEX, DEX, Vanna/Charm exposure) are documented and calculable | — Pending | | Multi-leg strategy output | User explicitly wants spreads, straddles, iron condors, butterflies — not just single-leg calls/puts | — Pending | | Dual output format (specific contracts + ranges) | Specific contracts as primary recommendation with alternative ranges for flexibility | — Pending | -| TastyTrade methodology as rules engine | Proven statistical edge: IVR-based strategy selection, 45 DTE entry, 21 DTE management, 50% profit targets with published win rates | — Pending | +| Tastytrade methodology as rules engine | Proven statistical edge: IVR-based strategy selection, 45 DTE entry, 21 DTE management, 50% profit targets with published win rates | — Pending | ## Evolution @@ -102,4 +103,4 @@ This document evolves at phase transitions and milestone boundaries. 4. Update Context with current state --- -*Last updated: 2026-03-29 after initialization* +*Last updated: 2026-03-29 after Phase 1 completion*