options-pricing

[STUB] Options pricing models including Black-Scholes, binomial trees, Monte Carlo, implied volatility surfaces, and Greeks for crypto options

7 stars

Best use case

options-pricing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

[STUB] Options pricing models including Black-Scholes, binomial trees, Monte Carlo, implied volatility surfaces, and Greeks for crypto options

Teams using options-pricing should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/options-pricing/SKILL.md --create-dirs "https://raw.githubusercontent.com/agiprolabs/claude-trading-skills/main/skills/options-pricing/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/options-pricing/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How options-pricing Compares

Feature / Agentoptions-pricingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

[STUB] Options pricing models including Black-Scholes, binomial trees, Monte Carlo, implied volatility surfaces, and Greeks for crypto options

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Options Pricing

> **Status: STUB** — This skill provides a basic Black-Scholes implementation and an overview of planned capabilities. Full implementation is awaiting community contribution.

Options pricing is the quantitative foundation of derivatives trading. For crypto markets, options on BTC and ETH trade actively on Deribit, Lyra, and Aevo, while Solana options are emerging on platforms like Zeta Markets and PsyOptions. Understanding pricing models, implied volatility surfaces, and Greeks is essential for hedging, volatility trading, and constructing structured products.

This skill is informational and analytical only. It does not provide financial advice or trading recommendations.

---

## Current Capabilities

This stub includes a working Black-Scholes calculator with Greeks computation and a basic implied volatility solver. See `scripts/black_scholes.py` for the implementation.

```python
import math
from scipy.stats import norm

def black_scholes_call(S: float, K: float, T: float, r: float, sigma: float) -> float:
    """Price a European call option using Black-Scholes.

    Args:
        S: Current underlying price.
        K: Strike price.
        T: Time to expiration in years.
        r: Risk-free rate (annualized).
        sigma: Volatility (annualized).

    Returns:
        Theoretical call option price.
    """
    d1 = (math.log(S / K) + (r + 0.5 * sigma**2) * T) / (sigma * math.sqrt(T))
    d2 = d1 - sigma * math.sqrt(T)
    return S * norm.cdf(d1) - K * math.exp(-r * T) * norm.cdf(d2)
```

Run the demo:

```bash
python scripts/black_scholes.py --demo
```

---

## Planned Capabilities

When fully implemented, this skill will cover:

### Pricing Models

| Model | Option Style | Use Case |
|-------|-------------|----------|
| Black-Scholes | European | Vanilla calls/puts, quick Greeks |
| Binomial Tree | American | Early exercise, dividend-paying assets |
| Monte Carlo | Exotic | Path-dependent, barrier, Asian options |
| Black-76 | Futures | Futures options on crypto perpetuals |

### Greeks

| Greek | Measures | Formula Basis |
|-------|----------|---------------|
| Delta | Price sensitivity to underlying | dC/dS |
| Gamma | Delta sensitivity to underlying | d²C/dS² |
| Theta | Time decay per day | dC/dT |
| Vega | Sensitivity to volatility | dC/dσ |
| Rho | Sensitivity to interest rates | dC/dr |

### Implied Volatility

- Newton-Raphson and bisection IV solvers
- Volatility smile and skew analysis
- IV surface construction (strike x expiry)
- IV term structure analysis
- Vol-of-vol estimation

### Crypto Options Platforms

| Platform | Chain | Assets | Style |
|----------|-------|--------|-------|
| Deribit | Off-chain | BTC, ETH | European |
| Lyra | Optimism/Arbitrum | ETH, BTC | European |
| Aevo | Ethereum L2 | BTC, ETH, alts | European |
| Zeta Markets | Solana | SOL, BTC | European |
| PsyOptions | Solana | SOL, various | American |

### Structured Products

- Covered calls and protective puts
- Straddles and strangles for volatility trading
- Vertical spreads for directional exposure
- Iron condors for range-bound markets
- Calendar spreads for term structure trades

---

## Prerequisites

```bash
# Core (for full implementation)
uv pip install numpy scipy

# Optional (for visualization)
uv pip install matplotlib
```

The included `scripts/black_scholes.py` uses only the Python standard library (`math` module) and runs without any dependencies.

---

## Use Cases

### Hedging
Compute delta-neutral hedge ratios for crypto spot positions using options. Calculate the number of put contracts needed to protect a portfolio against downside moves.

### Volatility Trading
Compare implied volatility to realized volatility to identify over/underpriced options. When IV significantly exceeds realized vol, selling premium may be favorable (and vice versa).

### Structured Products
Price structured products that combine options at different strikes and expirations. Analyze payoff profiles and breakeven points before execution.

### Risk Assessment
Use Greeks to understand portfolio-level exposure to price moves (delta), acceleration (gamma), time decay (theta), and volatility changes (vega).

---

## Quick Reference: Black-Scholes Formulas

**Call price:**
```
C = S * N(d1) - K * e^(-rT) * N(d2)
```

**Put price:**
```
P = K * e^(-rT) * N(-d2) - S * N(-d1)
```

**Where:**
```
d1 = [ln(S/K) + (r + σ²/2) * T] / (σ * √T)
d2 = d1 - σ * √T
```

**Put-call parity:**
```
C - P = S - K * e^(-rT)
```

---

## Files

| File | Description |
|------|-------------|
| `references/planned_features.md` | Planned features, formulas, data sources, and implementation priorities |
| `scripts/black_scholes.py` | Black-Scholes calculator with Greeks and implied vol solver |

---

## Contributing

This skill is a stub awaiting full implementation. To contribute:

1. Implement binomial tree pricing for American-style options
2. Add Monte Carlo simulation for exotic payoffs
3. Build IV surface construction from market quotes
4. Integrate Deribit API for live options chain data
5. Add portfolio Greeks aggregation

See `references/planned_features.md` for the full feature list and implementation priorities.

---

*This skill provides analytical tools and mathematical models for informational purposes only. It does not constitute financial advice. Options trading involves substantial risk of loss.*

Related Skills

yield-analysis

7
from agiprolabs/claude-trading-skills

DeFi yield evaluation including fee APR, real vs nominal yield, net APY after costs, and yield sustainability analysis

yellowstone-grpc

7
from agiprolabs/claude-trading-skills

Real-time Solana transaction and account streaming via Yellowstone gRPC (Geyser plugin)

whale-tracking

7
from agiprolabs/claude-trading-skills

Large wallet monitoring, accumulation and distribution detection, and smart money signal generation for Solana tokens

wash-sale-detection

7
from agiprolabs/claude-trading-skills

Wash sale detection under 2025 US crypto rules with 61-day window monitoring, disallowed loss tracking, and safe re-entry countdown

wallet-profiling

7
from agiprolabs/claude-trading-skills

Behavioral classification, performance analysis, and trading style detection for Solana wallets

walk-forward-validation

7
from agiprolabs/claude-trading-skills

Walk-forward validation framework for trading strategies and ML models with time-series-aware splits, overfit detection, and regime-aware validation

volatility-modeling

7
from agiprolabs/claude-trading-skills

Volatility estimation, forecasting, and regime classification using GARCH, EWMA, realized volatility, and volatility cones

vectorbt

7
from agiprolabs/claude-trading-skills

High-performance vectorized backtesting with parameter optimization, portfolio simulation, and rich performance metrics

trading-visualization

7
from agiprolabs/claude-trading-skills

Professional trading charts including candlesticks, equity curves, drawdowns, correlation heatmaps, and return distributions

trade-journal

7
from agiprolabs/claude-trading-skills

Structured trade logging, performance review, behavioral pattern detection, and strategy attribution for systematic improvement

trade-accounting

7
from agiprolabs/claude-trading-skills

Double-entry bookkeeping for trading operations with ledger management, P&L statements, balance sheets, and cash flow reporting

token-holder-analysis

7
from agiprolabs/claude-trading-skills

Token holder distribution, concentration metrics, insider detection, and supply analysis for Solana tokens