EQUITY OPTIONS / RISK ANALYTICS
Option Risk Explain.
Daily P&L attribution for equity-option portfolios.
Break down an option desk’s daily change into Delta, Gamma, Vega, Theta, rates and valuation residuals. Inspect the contracts behind each exception.
Python API · CLI · Interactive report Synthetic data
Daily desk review
−$1,152 OBSERVED P&L · USDSwitch between market moves and valuation checks.
Which factors explain the daily change?
SPY -0.9%, AAPL +1.2%
Loading scenario…
Loading scenarios…
Portfolio P&L
P&L by risk factor
Negative contributions to the left; positive to the right
Reading the attribution
- Greeks: opening sensitivities applied to the change in spot, implied volatility, rates and time.
- Approximation residual: full BSM repricing less the Greek estimate. Includes higher-order effects.
- Market/model basis: mark-to-market P&L less BSM repricing. Check valuation inputs and timestamps.
- Coverage: fixed contract quantities and European BSM pricing. Exercise, settlements and trades are excluded.
Contract-level attribution
| Contract | Contracts | Observed P&L | Greek explain | Approx. residual | Market/model basis | Flags |
|---|
Exceptions
User-selected threshold| Contract | Check | Amount / action |
|---|
The model assumes European exercise and unchanged positions. The regulatory FRTB P&L attribution test is outside its scope.
Custom portfolio analysisLocal Python server required
Upload two position snapshots to calculate a report for your own book. Contract identities, quantities and multipliers must match across both dates.
Use the same engine in your own workflow.
Analyze fixed-position snapshots from Python, the CLI or the local browser.
OPTION PRICING
Black–Scholes model
Call and put prices, Greeks and spot-price sensitivity. Inputs stay in the browser.
MODEL SENSITIVITY / SPOT
Premium against spot
The horizontal axis varies spot; all other parameters remain fixed. Curves are theoretical model values, not market prices.
FIRST- AND SECOND-ORDER RISK
Option Greeks
| Measure | Call | Put |
|---|---|---|
| Delta per 1-unit spot change | — | — |
| Gamma per unit of spot² | — | — |
| Vega per +1 vol. point | — | — |
| Theta per calendar day | — | — |
| Rho per +1 rate point | — | — |
Greeks are unavailable at expiration or zero volatility, where standard smooth derivatives break down.
MARKET DATA
Yahoo option chains
Calls, puts, bid/ask, implied volatility and open interest from Yahoo Finance. Available when the Python server runs locally.
Choose a symbol to retrieve its quote and expiration dates.
Call chain
| Strike | Last | Bid | Ask | IV | Volume | Open Int. |
|---|
Put chain
| Strike | Last | Bid | Ask | IV | Volume | Open Int. |
|---|
Yahoo data may be delayed or incomplete. Retrieval time is separate from the exchange quote timestamp.
For option-chain data, run python -m option_lab serve and open http://127.0.0.1:8765/. Static hosting supports the pricing model and four saved portfolio scenarios.
METHODOLOGY
Model assumptions
European option prices with continuous dividends. Scenario attribution uses opening Greeks and full model repricing.
BLACK–SCHOLES–MERTON
Closed-form pricing with continuous dividends
S is the underlying spot, K the exercise price, T the time in years, r the risk-free rate, q the dividend yield and σ the annualized volatility.
d₁ = [ln(S/K) + (r − q + σ²/2)T] / (σ√T); d₂ = d₁ − σ√T.
European contracts
Options are assumed exercisable only at expiration. This model does not include American early exercise.
Yahoo through the local API
The Streamlit-free Python adapter retrieves market quotes, listed expiration dates and call/put chains through yfinance. The public static GitHub Pages site is limited to theoretical pricing.
Theoretical prices
Constant volatility and rates, no transaction costs. Outputs are educational and are neither executable quotes nor trading recommendations.