feat(tools): add Options GPS for view-based options decisions#6
Open
bitloi wants to merge 4 commits intoentrius:mainfrom
Open
feat(tools): add Options GPS for view-based options decisions#6bitloi wants to merge 4 commits intoentrius:mainfrom
bitloi wants to merge 4 commits intoentrius:mainfrom
Conversation
- Forecast fusion (1h/24h) -> Aligned/Countermove/Unclear - Strategy generator: long call/put, debit spreads, iron condor - Payoff engine: PoP and EV from Synth percentiles - Ranking: Best Match, Safer Alternative, Higher Upside - Guardrails: no-trade on conflict or high vol - CLI 4 screens: View Setup, Top Plays, Why This Works, If Wrong - 16 tests (pipeline + Synth client); README per submission requirements
…ardrails - Strategy families: bull put credit spread, bear call credit spread, long call butterfly - Tail risk metric (worst 20% avg loss) and loss profile per card - Forecast confidence from percentile dispersion; no-trade when confidence < 0.25 - Hard guardrails: max-loss cap by risk level, spread-quality checks - Strategy-specific invalidation triggers and reroute rules - View-first fit scoring (user view primary, fusion bonus secondary) - Enforced card semantics: Safer must beat Best on PoP or max_loss; Upside must beat on EV - Structured decision/audit log (JSON) after Screen 4 - ASCII payoff visualization in Screen 3 - 23 tests, all passing
Collaborator
|
you're missing demo video |
Contributor
Author
|
I just added the demo video @e35ventura |
Collaborator
Contributor
Author
@e35ventura I fixed all the issues and pushed the changes. Please check again. |
…rade with confidence, EV%, improved UI - Add volatility_ratio param to rank_strategies: boosts defined-risk strategies and penalizes naked ones when forecast vol exceeds realized by >15% - Handle missing 1h data gracefully (fallback to 24h-only fusion) - should_no_trade returns reason string instead of bool; shows tentative best pick - Add EV as percentage of current price in rationale and display - Replace hard-coded volatility thresholds with adaptive is_volatility_elevated() - Box-drawing UI with confidence bars, block-char payoff chart, 24h range % - Named box-drawing constants (BOX_H, BOX_V, etc.) - 31 tests passing including vol-aware ranking, fusion fallback, EV%
Contributor
Author
|
@e35ventura Sorry for the mistake, I just pushed the changes. Would you mind reviewing the changes again? |
Collaborator
Contributor
Author
|
@e35ventura Sorry for the mistake, I fixed all. Please review the pr again. Thanks. |
Collaborator
16fcb82 to
8f48cde
Compare
Contributor
Author
|
@e35ventura I fixed again. |
Collaborator
|
UX is still lacking. |
…ific risk levels Screen 2 - Strategy Cards: - Show exact trade construction: BUY/SELL legs with strikes, premiums, quantities - Net debit/credit and expiry on every card - Max profit condition with specific dollar amounts - Organized sections: trade construction, metrics, risk management Screen 3 - Why This Works: - Add 1h range (5th/50th/95th) alongside 24h range - Synth 24h Price Distribution CDF visualization with % bars - 1h and 24h Forecast Path tables (time-series cone) - Probability labels (5%/20%/35%/50%/65%/80%/95%) on payoff chart - Strategy-aware thesis sentence with actual breakeven, median, PoP Screen 4 - If Wrong: - Show full position with legs and premiums - EXIT RULES with specific dollar stop-loss levels - ADJUSTMENT PLAYBOOK with concrete actions - KEY LEVELS with best/worst scenario P/L from distribution - REVIEW SCHEDULE with expiry and check triggers Pipeline: - Add StrategyLeg dataclass (action, quantity, option_type, strike, premium) - StrategyCandidate gains legs, expiry, max_profit, max_profit_condition - generate_strategies builds full leg details for every strategy type - _risk_plan uses actual strikes/premiums for specific exit levels and breakevens - _outcome_prices_with_probs for probability-labeled price levels - PERCENTILE_KEYS/LABELS constants for consistent labeling Tests: 35 passing (4 new: legs, spread legs, probs, risk plan specifics)
8f48cde to
562b887
Compare
Contributor
Author
|
@e35ventura Please check again |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.







Summary
Options GPS turns a trader's view into one clear options decision. The user provides symbol, market view (bullish / bearish / neutral), and risk tolerance (low / medium / high). The tool uses the Synth API for 1h and 24h prediction percentiles, option pricing, and volatility, then outputs three strategy cards: Best Match, Safer Alternative, and Higher Upside, each with chance of profit, max loss, tail risk, and invalidation/review guidance.
The pipeline: forecast fusion (1h/24h → Aligned/Countermove/Unclear), strategy generation (long call/put, debit/credit spreads, iron condor, butterfly), payoff engine (PoP, EV, tail risk), view-first ranking with guardrails, and a 4-screen CLI (View Setup, Top Plays, Why This Works, If Wrong) plus a JSON decision log.
Technical Document
The 1-page technical document is at
tools/options-gps/README.md. It covers:get_prediction_percentiles,get_option_pricing,get_volatilityRelated Issues
Closes #2 — Options GPS: High-Level System Design
Testing
python -m pytest tools/options-gps/tests/ -v)tools/options-gps/tests/(fusion, strategies, payoff, ranking, guardrails, confidence, Synth client)Unit tests: 23 passed. Manual: CLI run (BTC, neutral, medium) — all screens + decision log; see demo video for full run.
Checklist
tools/options-gps/README.mdtools/synth_client.SynthClientfor all Synth API accessDemo