Options Pricing Laboratory & Greeks Surface Explorer

Four pricing engines, eleven Greeks, and the hedging-frequency tradeoff that decides whether the P&L survives costs.

Contract live

What am I looking at?

You are pricing one European option and watching every sensitivity of that price move in real time. Every number here is computed in your browser from the Black–Scholes–Merton formula — nothing is looked up. Drag any slider and the tiles, the curve and the 3D surface all recompute.

The Greeks are the partial derivatives of the option price. First order: delta (spot), vega (vol), theta (time), rho (rates). Second order and beyond: gamma (how delta moves), vanna (delta vs vol), volga (vega vs vol), charm (delta vs time), veta (vega vs time), speed and zomma (third order). A desk hedges delta continuously, trades vega deliberately, and gets paid or punished by gamma and theta.

Price and Greeks

What am I looking at? (units matter here)

Theta is shown per calendar day and vega per volatility point (a 1% move in vol), because that is how a trading system quotes them. The library underneath works in natural units — per year, per 1.00 of vol — and the conversion happens only for display. Getting this wrong by a factor of 365 or 100 is the most common error in a first options project.

Watch what happens as you push expiry toward zero with spot near the strike: gamma and theta both blow up. That is not a numerical artifact. An at-the-money option's delta genuinely becomes a step function at expiry, so its derivative diverges. It is also exactly why nobody wants to be short a large at-the-money gamma position into the close on expiry day.

Greek profile across spot live

What am I looking at?

The chosen Greek as a function of spot, holding everything else at the slider values. The dashed vertical line is the strike. Switching to three maturities overlays a short, the current, and a long expiry — the clearest way to see that time to expiry controls how sharp every Greek is, not just how large. A one-week gamma is a tall spike at the strike; a two-year gamma is a low, wide hump.

3D surface over strike and maturity live

Drag to rotate, scroll to zoom. Recomputed live on every slider move: 45 strikes × 35 maturities = 1,575 closed-form evaluations per redraw.
What am I looking at?

The same Greek, now over the whole grid a desk actually quotes: strike on one axis, maturity on the other, at your current spot and vol. This is the shape a risk report collapses into a single number.

Rotate the vanna surface and you see why it matters: it is antisymmetric around the money, so a risk-reversal (long a call, short a put) accumulates vanna even when it looks delta-flat. Look at charm and you see the delta bleed that forces an unhedged book to trade every morning without the spot having moved at all.

Hedge settings

What am I looking at?

You sold one at-the-money call at the implied volatility shown, and you are hedging it to expiry by trading the underlying. The simulation ran 20,000 price paths in Python; the page holds a 301-point paired sample of the P&L and the traded notional from each run.

Why the cost slider is exact, not interpolated: the hedge decision never depends on the cost, so P&L at cost c is exactly pnl(0) − c × notional path by path. The page applies that transform to the stored pairs, so every distribution you see at any cost level is the true one, not a fit.

Terminal P&L of the hedged short position

What am I looking at?

The distribution of what you keep, per option, after hedging all the way to expiry. Positive is profit to the seller. If implied equals realised volatility and costs are zero, this distribution is centred on zero — you earn nothing, you just take risk. That is the theory working, not a bug.

Notice the distribution is left-skewed once costs are on: the seller's good outcomes are capped near the premium while the bad ones are not. Mean P&L alone hides this, which is why the 5% CVaR tile is there.

The tradeoff: risk vs cost vs rebalance frequency

What am I looking at? (read this one)

Three curves against how often you rebalance. Hedging error (the standard deviation of P&L) falls as you hedge more often — but only as the square root, so hedging 4× as often buys you a 2× reduction. Expected cost rises as the square root of frequency for the same reason in reverse. The objective curve adds them into what a risk-averse desk actually minimises: expected loss plus half a standard deviation.

The objective is a U. Push the cost slider to zero and the minimum runs off to the right — with free trading you should hedge continuously. Push costs up and the minimum walks left, toward hedging weekly or monthly. That migration is the entire result. The optimal frequency is a property of the cost level, not a best practice.

Does the √m law actually hold?

What am I looking at?

Standard deviation of P&L multiplied by √m, where m is the number of rebalances. If the Boyle–Emanuel result holds, this product is flat — all the frequency dependence has been divided out. The dashed line is the theoretical asymptote √(π/4) × vega × σ, computed independently of the simulation. Flatness of the solid line against that level is the validation.

Four engines, one contract precomputed

What am I looking at?

The same European option priced four independent ways. They must agree, and the size of the disagreement is the discretisation error of each method. Runtimes are from the machine that built this page, so treat them as ratios rather than absolutes.

The analytic formula is effectively free, which is exactly why every other engine is validated against it before being trusted on a payoff that has no closed form. That is the working method: prove the machinery on a problem you can check, then point it at one you cannot.

Binomial convergence

What am I looking at?

Absolute pricing error against the number of tree steps, log–log. The raw CRR tree converges at O(1/n) — slope −1 — but with a violent sawtooth. The cause is parity: whether a lattice node lands on the strike flips with each added step, so the error alternates in sign. Averaging the n and n+1 step trees cancels the leading oscillatory term and gives the smooth line. Same cost to within a factor of two, and roughly an order of magnitude better accuracy.

PDE convergence, with and without Rannacher startup

What am I looking at?

Crank–Nicolson error against grid size, log–log, with space and time steps refined together. Slope −2: second-order accurate, so doubling the grid quarters the error.

The second line drops the Rannacher startup. Crank–Nicolson is A-stable but not L-stable: it damps the high-frequency modes introduced by the kink in the payoff by a factor approaching −1 per step, so they oscillate instead of dying. Two fully implicit steps at the start kill them, and cost nothing in accuracy.

Monte Carlo convergence and variance reduction

What am I looking at? (an honest negative result)

Standard error against path count, log–log. Slope −1/2, the Monte Carlo rate, and no amount of cleverness changes that exponent — variance reduction only shifts the line down, never tilts it.

The control variate (regressing the payoff on the discounted terminal spot, whose expectation is known exactly) buys roughly a 6× variance reduction here. What is more interesting is what the build log shows about combining it with antithetic variates: the pair is worse than the control variate alone. The control removes the component of the payoff that is monotone in the terminal spot, which is precisely the component antithetic pairing exploits. What is left is close to an even function of the random draw, so Z and −Z become positively correlated and pairing them hurts. Variance reduction techniques are usually taught as additive. These two are substitutes.

Early-exercise premium surface precomputed

What am I looking at?

How much more an American option is worth than the otherwise identical European, across strike and maturity. The right to exercise early is an option on an option, and this surface is its value.

The shape is the lesson. For puts the premium is large and grows with maturity and with how deep in the money you are: a deep ITM put is nearly a short forward, and holding it to expiry means forgoing interest on the strike you could collect today. For calls on a dividend-paying underlying the premium is much smaller and concentrated in deep ITM, long-dated strikes — with no dividend it would be exactly zero everywhere, which is Merton's classic result that you never exercise an American call on a non-dividend-paying stock early.

Three methods, one American put precomputed

What am I looking at?

An American put priced by binomial tree, by Crank–Nicolson with projected SOR, and by Longstaff–Schwartz least-squares Monte Carlo. The tree is the benchmark.

LSM is the interesting one because it is the only method here that scales to many underlyings, and it has three biases pulling against each other: the estimated exercise policy is suboptimal (down), the regression is fitted and evaluated on the same paths (up), and restricting exercise to a finite set of dates makes it a Bermudan (down). So the gap to the tree is reported in standard errors rather than dressed up as an ordering that theory does not actually pin down.

Analytic Greeks vs finite differences precomputed

What am I looking at?

Every analytic Greek formula checked against a central finite difference of the price function, which knows nothing except how to call the pricer. This catches sign errors and dropped terms, which is exactly the class of bug that a plausible-looking number will not reveal.

Relative errors near 1e−8 for first-order Greeks and 1e−5 for third-order ones are the expected floor: a central difference has O(h²) truncation error but O(ε/h) round-off, and each additional order of differencing divides by another power of h. A large relative error on a Greek whose absolute value is near zero is noise, not disagreement, so the absolute column is shown alongside.

Put–call parity live

What am I looking at?

Parity says C − P = S·e−qT − K·e−rT. It is a no-arbitrage identity, not a model result: it holds for any arbitrage-free model, so an implementation that violates it is broken regardless of what volatility you feed it. Computed live from the sliders in the Greeks Lab — change them and watch the residual stay at machine precision.

Stress panel: break the model on purpose

Each button pushes the pricer to a place where a naive implementation returns NaN, a blank chart, or a confidently wrong number. The result and what it should be are shown side by side.

What am I looking at?

Degenerate inputs are where implementations quietly fail. Zero volatility divides by zero in d1. Zero time to expiry does the same and additionally makes delta a step function. Very deep out-of-the-money options underflow to a price of exactly zero, at which point implied volatility is not merely hard to compute, it does not exist.

This library takes the analytic limit in each case rather than letting the arithmetic decide: at zero total variance the option is worth its discounted forward intrinsic value, delta is the step, and every second-order Greek is zero. That is the correct answer, and it is also what stops the charts on this page going blank when you drag a slider to its endpoint.