Complete Strategy Calculator Guide
Overview
calculator_with_strat.py is an all-in-one analysis tool that combines:
1. Options strategy analysis (expected move)
2. Directional bias prediction (which way stock will move)
3. Exit strategy recommendations (when to take profits/losses)
Quick Start
What You Get
Step 1: Options Strategy Analysis
Shows: - Pass/Fail recommendation - Stock price and volume - IV/RV ratio - Term structure slope - Expected Move (e.g., ±3.44%)
Purpose: Determine if the stock is a good candidate for calendar spreads
Example:
Step 2: Directional Bias Analysis
Market Signals Table:
┌────────────────────┬─────────┬───────────────┐
│ Signal │ Value │ Interpretation│
├────────────────────┼─────────┼───────────────┤
│ Put/Call IV Skew │ -0.0031 │ Neutral │
│ Put/Call Volume │ 0.48 │ Bullish │
│ Put/Call OI │ 1.14 │ Neutral │
│ 5-Day Trend │ +0.70% │ Neutral │
└────────────────────┴─────────┴───────────────┘
Overall Assessment: - Bias: Bullish/Bearish/Neutral - Confidence: 0-100% - Expected Directional Move: e.g., +0.95%
Strike Recommendation:
Current Price: $186.23
Expected Move: ±3.44%
Suggested Strike: $185.00
Strike Adjustment: -0.66%
Rationale: Heavy call buying (bullish)
Purpose: Determine which strike to use (ATM, OTM up, or OTM down)
Step 3: Exit Strategy & Risk Management
Position Greeks Example:
┌───────┬──────────────┬────────────────────────┐
│ Greek │ Value │ Interpretation │
├───────┼──────────────┼────────────────────────┤
│ Theta │ $0.24/day │ Earning time value ✓ │
│ Delta │ 0.0045 │ Low directional risk ✓ │
│ Gamma │ -0.01400 │ Manageable │
│ Vega │ $0.13/1% IV │ Low IV risk ✓ │
└───────┴──────────────┴────────────────────────┘
Exit Rules:
┌─────────────────────┬────────────────────┬─────────┐
│ Rule │ Trigger │ Urgency │
├─────────────────────┼────────────────────┼─────────┤
│ ✅ Profit Target │ 25% of max profit │ EXIT │
│ ❌ Stop Loss │ 75% loss │ EXIT │
│ 📉 Negative Theta │ Theta < 0 │ EXIT │
│ ⚡ High Greeks │ Delta >0.30 │ ALERT │
│ ⏰ Time Accel │ ≤3 days to exp │ EXIT │
│ 📊 IV Crush Done │ >40% IV crush │ CONSIDER│
│ 📉 Peak Drawdown │ >30% from peak │ CONSIDER│
└─────────────────────┴────────────────────┴─────────┘
Daily Monitoring Checklist: - [ ] Calculate current theta - Still positive? - [ ] Check days to expiration - Getting close? - [ ] Monitor delta - Still near neutral? - [ ] Track P&L vs peak - Any drawdown? - [ ] Check IV changes - Front crushed? - [ ] Review Greeks risk - Any too high?
Purpose: Know when to exit the trade for maximum profit or minimal loss
Final Output: Complete Trading Plan
╭─────────────── NVDA Trading Plan ───────────────╮
│ │
│ Expected Move: ±3.44% │
│ Directional Bias: NEUTRAL (Confidence: 50%) │
│ Suggested Strike: $185.00 │
│ │
│ Recommended Actions: │
│ 1. Enter calendar spread at $185.00 strike │
│ 2. Set profit target at 25% of max profit │
│ 3. Set stop loss at 75% of position cost │
│ 4. Monitor theta daily - exit if negative │
│ 5. Exit if front expiration ≤ 3 days │
│ 6. Consider exiting after 40%+ IV crush │
│ │
╰─────────────────────────────────────────────────╯
Real Example Walkthrough
Example 1: NVDA Analysis
Input:
Step 1 Output:
→ Interpretation: NVDA has 3.44% expected move, IV is elevated vs realized volStep 2 Output:
Directional Bias: NEUTRAL (50% confidence)
Put/Call Volume: 0.48 (Bullish - heavy call buying)
Suggested Strike: $185.00 (current: $186.23)
Step 3 Output:
Theta: $0.24/day (Earning time value ✓)
Exit Rules:
- Profit target at 25%
- Stop at 75% loss
- Exit if theta negative
Trading Decision: 1. ✅ Enter calendar spread at $185 strike 2. ✅ Set profit target: Exit when P&L hits 25% of max profit 3. ✅ Set stop loss: Exit if down 75% of cost 4. ✅ Monitor theta daily 5. ✅ Exit if < 3 days to expiration
Example 2: High Confidence Bullish Signal
Output:
Directional Bias: BULLISH (75% confidence)
Expected Move: ±8.5%
Put/Call IV Skew: -0.08 (Calls expensive)
Put/Call Volume: 0.62 (Heavy call buying)
5-Day Trend: +4.8% (Strong uptrend)
Suggested Strike: $192.00 (current: $186.00)
Rationale: Multiple bullish signals converge
Trading Decision: - Enter at $192 strike (3.2% OTM to upside) - Higher profit potential if bullish bias correct - Still capped at 50% of expected move (conservative)
Example 3: Bearish Signal with Lower Confidence
Output:
Directional Bias: BEARISH (40% confidence)
Expected Move: ±6.2%
Put/Call Volume: 1.35 (More put buying)
Recent Trend: -2.1%
Suggested Strike: $185.00 (current: $186.00)
Rationale: Weak signals - stay ATM for safety
Trading Decision: - Stay ATM at $185 (only 0.5% adjustment) - Low confidence → don't position aggressively - Let IV crush drive profits, not direction
Comparison with Individual Scripts
Method 1: calculator_with_strat.py (All-in-One)
Pros: - ✅ Everything in one place - ✅ Complete trading plan generated - ✅ Faster workflow - ✅ See how all pieces connect - ✅ Good for learning
Cons: - ❌ Less flexible - ❌ Can't deep-dive into one component
Best for: - Quick pre-trade analysis - Beginners learning the system - Standard calendar spread trades - When you want the "complete picture"
Method 2: Individual Scripts (calculator.py → directional_analysis.py → test_exit_strategy.py)
Pros: - ✅ More detailed analysis per component - ✅ Can skip sections if not needed - ✅ Better for advanced users - ✅ More customization options
Cons: - ❌ More steps - ❌ Need to connect pieces manually - ❌ Takes longer
Best for: - Deep analysis of specific aspect - Advanced traders - Custom strategies beyond calendar spreads - Research and backtesting
When to Use Each Approach
Use calculator_with_strat.py when:
- You're analyzing a new trade setup
- You want a quick complete picture
- You're learning the system
- You need all three components
- Time is limited
Use individual scripts when:
- You only need one analysis (e.g., just direction)
- You want more detailed output
- You're doing research/backtesting
- You need custom configurations
- You're comparing multiple approaches
Integration with Workflow
Pre-Trade Analysis:
1. Screen candidates
→ rank_tickers.py --db
2. Quick analysis of top picks
→ calculator_with_strat.py
3. Deep dive on finalists (optional)
→ directional_analysis.py NVDA
→ test_exit_strategy.py
4. Backtest setup (optional)
→ Edit monte_carlo.py with parameters
→ run_yearly_analysis.py
Post-Trade Monitoring:
1. Daily monitoring
→ Calculate Greeks manually
→ Check against exit rules
2. Weekly review
→ Re-run calculator_with_strat.py
→ See if bias/setup has changed
3. Pre-exit analysis
→ test_exit_strategy.py
→ Get comprehensive exit signal
Customization
Modify Thresholds:
Edit the script to change: - Profit target (default: 25%) - Stop loss (default: 75%) - Greeks thresholds (delta, gamma, etc.) - Confidence requirements
Add Custom Signals:
In display_directional_bias():
# Add your own signal
custom_signal = your_analysis_function(ticker)
signals_table.add_row("Custom Signal", f"{custom_signal:.2f}", interpretation)
Adjust Exit Rules:
In display_exit_strategy():
Tips & Best Practices
1. Always Check All Three Steps
Don't skip steps - each provides critical information: - Step 1: Is trade viable? (expected move) - Step 2: Which strike? (directional bias) - Step 3: When to exit? (risk management)
2. Document Your Analysis
Save the output for each trade:
3. Compare with Historical Data
Run analysis before and after earnings: - Before: See predictions - After: Check accuracy - Learn: Improve interpretation
4. Use with Monte Carlo
After running calculator_with_strat.py:
# Take the output parameters
Expected Move: 8.5%
Directional Bias: Bullish (+3.5%)
Suggested Strike: $190
# Plug into monte_carlo.py
params = SimulationParams(
expected_move_pct=8.5,
directional_bias="bullish",
directional_bias_pct=3.5,
strike_price=190,
use_dynamic_exit=True,
)
5. Monitor Confidence Levels
- High confidence (>60%): Trust the directional bias
- Medium confidence (40-60%): Use caution, small adjustments
- Low confidence (<40%): Stay ATM, ignore directional bias
Troubleshooting
Q: Script fails on directional analysis? A: Check if ticker has options data. Some stocks lack sufficient options liquidity.
Q: Greeks show zero or unusual values? A: Normal for example calculations. Use actual position data for real Greeks.
Q: Suggested strike is far from current price? A: High confidence + large expected move can suggest OTM. Review rationale carefully.
Q: Different results than individual scripts? A: calculator_with_strat.py uses first available expiration. Specify expiration in individual scripts for consistency.
Q: Exit rules seem too aggressive/conservative? A: Thresholds are configurable. Adjust based on your risk tolerance and trading style.
Advanced Features
1. Batch Analysis
# Analyze multiple tickers
for ticker in NVDA TSLA AAPL; do
echo "$ticker" | uv run python scripts/calculator_with_strat.py > "analysis_$ticker.txt"
done
2. Automated Alerts
# In your monitoring system
result = analyze_ticker("NVDA")
if result['theta'] < 0:
send_alert("NVDA theta negative - exit position!")
3. Custom Workflows
# Import the functions directly
from scripts.calculator_with_strat import display_directional_bias, display_exit_strategy
# Use in your own scripts
bias_info = display_directional_bias("NVDA", 8.5)
exit_info = display_exit_strategy("NVDA", 8.5, bias_info)
Summary
calculator_with_strat.py is your one-stop shop for: - ✅ Complete pre-trade analysis - ✅ Strike selection with directional bias - ✅ Exit rules and risk management - ✅ Daily monitoring guidelines - ✅ Complete trading plan
Use it to: 1. Quickly evaluate trade opportunities 2. Get strike recommendations 3. Set up exit rules before entering 4. Generate complete trading plans 5. Learn how all components integrate
For more detail:
- DIRECTIONAL_BIAS_GUIDE.md - Directional methodology
- DYNAMIC_EXIT_GUIDE.md - Exit strategy details
- MONTE_CARLO_GUIDE.md - Backtesting integration
Next Steps: 1. Run on a few tickers to get familiar 2. Compare with your current analysis process 3. Integrate into your pre-trade routine 4. Track results and refine interpretation