feat(options-gps): market line shopping — multi-exchange divergence comparison#37
feat(options-gps): market line shopping — multi-exchange divergence comparison#37MkDev11 wants to merge 3 commits intoentrius:mainfrom
Conversation
…omparison Closes entrius#32 Adds multi-exchange price comparison to Options GPS, comparing Synth's theoretical option prices against Aevo, Deribit, and OKX to identify market divergence — like shopping for lines in sports betting. - New exchanges.py: pluggable ExchangeProvider abstraction with three mock providers (Aevo, Deribit, OKX), each with distinct pricing personality. Computes per-exchange divergence metrics (avg/max absolute divergence, signed call/put divergence vs Synth fair value). - Confidence metric integration: adjust_confidence_for_divergence() in pipeline.py nudges confidence based on market consensus — strong agreement (+0.05), disagreement (-0.07). Contextual overlay, not a hard guardrail. - Screen 1b (Market Context): MARKET LINE SHOPPING block shows consensus classification and per-exchange divergence summary. - Decision log: market_lines section with consensus, avg/max divergence, and per-exchange breakdown in JSON output. - 24 new tests covering divergence computation, mock providers, consensus classification, confidence adjustment, edge cases (zero prices, empty data, failing providers), and end-to-end integration. - README updated with Market Line Shopping section documenting exchanges, metrics, env vars for future real adapters.
|
…st venue highlighting - Live execution: LiveDeribitProvider and LiveAevoProvider fetch real-time option mark prices via public REST APIs when API keys are configured. Falls back to mock providers when credentials are absent or calls fail. - Edge detection: alpha is in disagreement, not consensus. Z-score model measures how far Synth deviates from market mean per strike. Higher |z| = more alpha = higher confidence boost (+0.10 at z≥2σ). - Best execution venue: after strategy selection, identifies which exchange offers the best price per leg (cheapest for BUY, richest for SELL). Displayed on Screen 2 with savings vs Synth and per-exchange comparison. - 37 tests covering z-scores, best venues, live provider properties, edge-based confidence, partial failure mode, exchange_prices storage. - 117 total tests pass (80 existing + 37 new).
|
Closing this in favor of the implementation in PR #39. Thank you for the contribution! |
Summary
Adds Market Line Shopping to Options GPS — compares Synth's theoretical option prices against multiple exchanges (Aevo, Deribit, OKX) to identify market divergence, like a sports bettor "shopping for lines" to find an edge. Exchange divergence is visualized on the Market Context screen (Screen 1b) and used to refine the Confidence metric that drives Screens 1 and 2.
What's included:
AEVO_API_KEY,DERIBIT_CLIENT_ID,DERIBIT_CLIENT_SECRETfrom env so real adapters can be plugged in later; defaults to mock-only mode.Aevo: avg |Δ| 2.8pp, max 7.2pp; calls +3.1pp, puts -2.2pp vs Synth).market_linesJSON section with consensus, avg/max divergence, and per-exchange breakdown.Related Issues
Closes #32
Type of Change
Testing
Test command:
python -m pytest tools/options-gps/tests/ -vResult: 104 passed (80 existing + 24 new) in 0.14s
Manual verification: Ran
python tools/options-gps/main.py --symbol BTC --view bullish --risk medium --no-prompt --screen 1— confirmed MARKET LINE SHOPPING block renders on Screen 1b with per-exchange divergence, consensus label, and adjusted confidence in decision log.Checklist
Files Changed
Demo Video
11.03.2026_12.15.40_REC.mp4