
Options Strategy
Options strategy framework supporting Black-Scholes pricing, Greeks analysis, and...
Install
npx skills add HKUDS/Vibe-Trading --skill options-strategy -g -a claude-code -y- Repository
- HKUDS/Vibe-Trading37.4k
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 1,978 tokens
- Runs scripts
- Yes, review before use
What it does
Options strategy framework supporting Black-Scholes pricing, Greeks analysis, and multi-leg backtesting. Suitable for cryptocurrency and equity options.
Purpose
Backtesting of option portfolio strategies. Starting from the underlying price, the engine synthesizes theoretical option prices with the Black-Scholes model, then simulates PnL, Greeks exposure, and expiration exercise for multi-leg option portfolios.
Applicable scenarios:
- Hedging strategies (
covered call,protective put) - Volatility trading (
straddle,strangle) - Spread strategies (
iron condor,butterfly,calendar spread) - Option pricing analysis and Greeks sensitivity research
Supported Strategy Types
| Strategy | Structure | Applicable Market View |
|---|---|---|
| Covered Call | Hold underlying + short call | Mildly bullish, collect premium |
| Protective Put | Hold underlying + long put | Bullish but wants downside protection |
| Straddle | Buy same-strike call + put | Expect large movement, direction uncertain |
| Strangle | Buy different-strike call + put | Expect large movement, lower cost |
| Iron Condor | Sell put spread + sell call spread | Range-bound market, collect premium |
| Butterfly | Buy low call + sell 2 middle calls + buy high call | Expect narrow-range movement |
| Calendar Spread | Sell near-month + buy far-month at same strike | Exploit differences in time decay |
OptionsSignalEngine Interface
Write the strategy in code/signal_engine.py, with class name SignalEngine, implementing the generate method:
class SignalEngine:
"""Option strategy signal engine."""
def generate(self, data_map: dict) -> list:
"""Generate option trading instructions.
Args:
data_map: code -> DataFrame (columns: open, high, low, close, volume)
