Methods

How the calculators on this site arrive at their numbers: conventions, approximations and numerical methods.
The theory is explained under Learn, the sources are listed under References, and Validation compares the prices with independent implementations.

P&L at the horizon

The Payoff Profile, the probabilities of the portfolio row and the P&L heatmap use the same P&L: the value of the positions at the horizon t minus their value today, Vt−V0, not discounted.
The unhedged figures of the Hedge Simulator use the same Vt, but in today's money: their P&L is e−rtVt−V0 (Learn → Risk & Return).
Every position is revalued with Black-Scholes at its remaining maturity T−t and its own implied volatility. Rate and dividend yield stay as they are today.
A position that expires before the horizon counts with its payoff at the spot of the horizon. That is exact at its own expiry and an approximation after it. The simulation in the Hedge Simulator settles each position at its own expiry instead.

Dividends. Under Q the spot grows at r−q only, because the underlying pays out qSudu. Whoever holds the underlying receives these dividends, so they belong to the P&L of an underlying position. They are taken at their risk-neutral expectation qS0e(r−q)udu and earn the rate r until the horizon. Per unit this gives D(t)=∫0tqS0e(r−q)uer(t−u)du=S0ert(1−e−qt)=S0ert−Ft, the amount by which the forward Ft=S0e(r−q)t lies below the financed spot. The underlying then earns the rate like every other position, EQ[St]+D(t)=S0ert, in line with cash and carry: buying the underlying and selling it forward is riskless and must return r.
Example with S0=100, r=4%, q=1% and t=1: the expected price gain is Ft−S0=3.045, the dividends are D=1.036, together S0(ert−1)=4.081.

D(t) is a fixed amount. With nU units of the underlying it shifts the P&L by nUD(t): up for a long position, down for a short position, which pays the dividends. The shape of the Payoff Profile stays the same. Break-evens and probabilities move with it.
The real dividends depend on the path of the spot. Taking their expectation keeps the P&L a function of the spot at the horizon alone. The simulation in the Hedge Simulator pays them along each path.
The P&L heatmap uses the rate and the dividend yield of each scenario. On the strategy pages the charts and example values include D, while the formulas show the pure payoff. The P&L Attribution and the Payoff Builder work with values only, without dividends.

Probabilities

Q is the risk-neutral measure of Black-Scholes: the spot at T is lognormal and grows at r−q. Probabilities under Q are prices, not forecasts (Learn → Black-Scholes).
For a single option the three probabilities of the Positions table are in closed form: Q(ITM)=N(±d2) for calls and puts, and Q(Profit) and Q(Excess) are the probabilities that the payoff exceeds today's price V0 or V0erT, which is N(±d2) at the strike shifted by that amount.

For the portfolio the three are measured at the horizon t of the Payoff Profile, with the P&L described above. The P&L is evaluated on a fine grid of the spot at the horizon, every change of sign is located by bisection, and the lognormal probabilities of the intervals with a positive P&L are added up. A P&L of exactly zero does not count as a profit.
If the positions have different implied volatilities, the distribution of the spot uses their average, weighted with the absolute vega |niνi| of each position. The probabilities are then marked with ≈.
The unhedged probability P(P&L>0) in the Hedge Simulator is computed in the same way, with the drift μ−q, the realised volatility and the P&L in today's money. With μ=r and a realised volatility equal to the implied one it is the Q(Excess) of the portfolio row.

Hedge Simulator

Paths. The spot is simulated under P with drift μ−q and volatility σreal on the rebalancing dates, one every δt up to the horizon t of the Payoff Profile, and on the expiry dates of the positions before the horizon. With antithetic paths every second path uses the mirrored random numbers of the one before. The seed fixes the random numbers. Up to one million paths can be entered. The computing time grows with paths times steps times positions, the number of valuations. Up to ten million valuations the simulation starts at once. Above that, the first click on Update Simulation times a few paths and shows an estimate of the computing time, and a second click starts the simulation. The page does not respond while it runs. Above 100 million valuations the number of paths is reduced. If steps times positions exceed 40,000, the simulation does not run and asks for a lower N.

Hedge. On every date the hedge is set to minus the Black-Scholes delta of the portfolio at implied volatility. Each trade pays k times its value. The first hedge and the final unwind are free, as in the analytic formulas. When an option expires before the horizon, its delta drops out of the hedge in one trade, and that trade costs k as well.
Cash earns r, all shares held (the hedge and the underlying positions) earn the dividend yield q along the path, and options that expire before the horizon pay into the cash account. The P&L is the value of positions, hedge and cash at the horizon, discounted to today.

Analytic column. Expected P&L and standard deviation of the continuous and of the discrete hedge and the expected costs (Learn → Hedging in Practice). The simulated values approach them as the number of paths grows and the rebalancing gets finer. ± is the 95 % confidence interval of the simulated mean. The analytic standard deviation of the discrete hedge is exact to first order in δt, so small differences remain with few rebalances. The values after costs marked with ≈, including P(P&L>0), VaR and expected shortfall, assume a normal distribution with the analytic mean and standard deviation.

Warning. It appears when the distribution function of the simulated P&L differs from a normal distribution with the same mean and standard deviation by more than 5 percentage points somewhere (Kolmogorov-Smirnov distance). This is the largest error of any probability read off the normal curve. A significance test is not used: with thousands of paths it rejects normality even for deviations that do not matter.

Payoff Builder

The spot axis of the drawing area is divided into 200 steps. The payoff is sampled at the points it covers, at most 201 spots Sj with values yj. The fit combines cash a, b units of the underlying and calls with quantities wi at strikes Ki: P(ST)=a+bST+∑i=1nwi(ST−Ki)+ Calls are enough for any payoff (Learn → Static Replication). For given strikes P is linear in a,b,wi, so the best quantities follow from least squares: mina,b,w ∑j(yj−P(Sj))2

Strikes. They are chosen from the allowed strikes (multiples of the strike step, at most 300) greedily: in each step the strike that reduces the squared error most is added, until another strike would barely lower the error or the maximum number of options is reached. Then each strike is exchanged for a better one where that lowers the error, in two passes, and options with a negligible quantity are dropped.

Rounded quantities. Rounding the exact quantities is not enough. An exact quantity is the change of slope at its strike, and where it is smaller than half the step it rounds to zero, so a gently curved payoff would lose all its options. The rounded fit is therefore optimised directly.
With quantities in multiples of the step δ, the slope of the fitted payoff between two neighbouring strikes is a multiple of δ as well, and its value changes from one strike to the next by a multiple of δ times the strike step. A dynamic program runs along the allowed strikes and keeps, for every such level in a band around the payoff, every slope and every number of options used so far, the smallest squared error up to that strike. This gives a fit for every number of options at once, with strikes that can differ from those of the exact fit. It is the best one on the levels searched. The grid of levels is tried in a few positions only, so it is not a proven optimum.
The result is compared with the rounded exact fit, and the better of the two is taken. In the rounded exact fit each exact quantity is rounded down or up, single quantities are then moved by one step as long as the error falls, and strikes are left out where that lowers the error. The cash amount a is refit to the mean residual and is not rounded.
For very fine steps or payoffs with jumps the dynamic program would need too many levels and slopes. Then only the rounded exact fit is used, which works well for fine steps.
If the payoff is nowhere steeper than δ, the fit can only alternate between flat pieces and pieces of slope ±δ. A note under Fit Quality says so.

Premium. The premium is the Black-Scholes value today of the fitted payoff P(ST) paid at maturity, ae−rT+bS0e−qT+∑i=1nwiCi with the call prices Ci. It is for information only, the fit itself does not depend on volatility and maturity.
The premium is the same whether the portfolio is shown with calls, puts or out-of-the-money options, because put-call parity turns one into the other.
The value of the listed positions differs from it by nUS0(1−e−qT), where nU is their quantity of the underlying. A unit of the underlying costs S0 and pays dividends in addition to ST, and this is the present value of those dividends (Methods → P&L at the horizon).

Solver

The solver finds every value x of the unknown input with g(x)=VBS(x)target−target value=0. It evaluates g on a grid of 800 steps over the whole range, logarithmic for S,K,T and σ and linear for r and q, and refines every change of sign by bisection. Every local extremum of g is refined by golden-section search, so a target value exactly at a maximum or minimum is found as well, for example the highest price an out-of-the-money digital can reach.
Ranges: 10−3 to 103 times the strike for S and times the spot for K, T up to 50 years, σ up to 500 %, r and q between −50 % and 50 %.
With each solution the solver shows the sensitivity g′(x)=∂target/∂x, from a central difference, and the change of the solution when the target value rises by 1 %, δx≈δtarget/g′(x). At a maximum or minimum of the target, where g′(x)=0, it says so instead.

Calibration

The calibration in Other Models minimises ∑i(Vimodel−Vimarketνi)2, the squared price errors divided by the Black-Scholes vega, which is approximately the squared error in implied volatility. It uses the Levenberg–Marquardt method (Levenberg, 1944; Marquardt, 1963) with numerical derivatives. Parameter bounds are kept by transformations, for example ρ=tanh⁡y.

Each iteration linearises the scaled errors ei around the current parameters y. With the Jacobian Jij=∂ei/∂yj, computed by forward differences, a step δ changes the errors by about Jδ. Minimising the linearised sum of squares gives the Gauss–Newton step J⊤Jδ=−J⊤e. Close to the minimum it converges in a few iterations, far from it the linearisation is poor and the step can overshoot. Levenberg–Marquardt adds a damping λ to the diagonal: (J⊤J+λdiag(J⊤J))δ=−J⊤e. A small λ gives the Gauss–Newton step, a large one a short step down the gradient, scaled for each parameter. If the step lowers the error, it is taken and λ is divided by 3. Otherwise λ is multiplied by 4 and the step is tried again. The method thus moves from careful steps far from the minimum to fast steps close to it. Each iteration costs one model price per quote and free parameter for the Jacobian, plus one per quote for every step tried.

It stops at the first of three conditions:
Converged: no step lowers the error any more (the damping exceeds 1010), or the relative improvement falls below 10−10. This is the usual end, mostly after fewer than 20 iterations.
Exact fit: the error sum falls below 10−16, e.g. for quotes generated by the same model.
Limit: after 60 iterations. Then the fit may not be fully converged, and pressing Calibrate again continues from the current parameters. Models with many free parameters, for example Bates or CGMY, reach the limit more often.
The result is a local optimum: the start values are the current parameters.
For rough Heston the iterations first use 64 time steps without the error estimate and, once they have converged, continue with 128 (Methods → Rough Heston). This takes less than half the time.
What the choices behind a calibration mean: Learn → Other Models.

American options

American calls and puts in the Path-Dependent Calculator are valued with finite differences. The Black-Scholes equation is solved backwards from maturity on a grid of x=ln⁡(S/K) and time, and at every step the value is the larger of holding on and exercising (Brennan and Schwartz, 1977).
The grid has 801 spots, placed densely around the strike, and 200 time steps that are shortest just before maturity and just before every ex-date. One solution gives the value for every spot.
The exercise condition is met exactly at every step by policy iteration. That also covers negative rates, where a put can have two critical spots.
If early exercise can never pay, the Black-Scholes formula is used instead: for a call with q≤0 and r≥q, for a put with r≤0 and q≥r, in both cases without cash dividends.

Accuracy. Checked against QuantLib on 1,170 options with maturities up to three years: for a strike of 100 the largest error is 0.0003, and 95 % of the errors are below 0.0001 (Validation).

Cash dividends. A dividend D lowers the spot by D on the ex-date. The value just before the ex-date is the value just after it at S−D, or the intrinsic value if that is larger. The dividend yield q applies in addition, so set it to zero for a stock whose dividends are entered as cash. The European value shown for comparison is computed on the same grid without the exercise condition.

Critical spot. Read off the grid at every time step. It lies in the cell of the last grid spot at which the option is exercised, and how far into that cell follows from how strongly the exercise condition binds there. Compared with a grid eight times finer it is off by about 0.05 at most for a strike of 100, and by more only in the last days before maturity. Below a quarter and above four times the strike none is reported.

Greeks. Delta, gamma, vega and rho by finite differences of the grid value. Theta is zero once exercise is optimal. While the option is held it follows from the Black-Scholes equation: Θ=−(12σ2S2Γ+(r−q)SΔ−rV). At the critical spot gamma jumps, so the Greeks are unreliable right there.

Implied volatility. Bisection on the volatility between 0.5 % and 500 %, each step with a new grid.

Rough Heston

The characteristic function of the rough Heston model (El Euch and Rosenbaum, 2019) is ln⁡EQ[ewln⁡(ST/F)]=κθ∫0Th(t)dt+v0I1−αh(T),Dαh=12(w2−w)+(ρξw−κ)h+12ξ2h2, with α=H+12, h(0)=0, the fractional derivative Dα and the fractional integral I1−α. The Fourier integrals need it at w=iu and w=1+iu (Learn → Numerical Methods).

Time steps. The fractional Riccati equation has no solution in closed form. It is solved in its integral form h=IαF(h), with F(h) the right-hand side above, by the fractional Adams method on 128 equal time steps (Diethelm, Ford and Freed, 2002). Each step is implicit: the new value solves a quadratic equation, and of its two roots the one that starts at zero is taken. The usual explicit predictor-corrector version becomes unstable at the large frequencies the integrals need.

Frequencies. For each maturity the equation is solved once for a fixed set of frequencies u on Gauss–Legendre panels and then used for all strikes. The panels widen with the frequency until |φ(u)|/u falls below 10−13. For a strike far from the forward they stay narrow, so that the oscillating factor e−iuln⁡K is resolved.

Accuracy. Each price is computed a second time with 64 steps. The difference, divided by the Black-Scholes vega, estimates the error in implied volatility. Where it reaches 0.01 vol pts for a maturity shown, a note appears in the Other Models calculator, in the Option Chain Builder and in the chart on Learn → Other Models. With the standard parameters the estimate stays below that. It grows with a small H, a large ξ and ρ close to −1, mostly far from the money and for very short maturities, where the Adams method is known to be inaccurate (Boyarchenko and Levendorskiĭ, 2024). With H=0.5 the price agrees with the closed-form Heston price (Validation).

SSVI

SSVI gives the implied volatility directly (Gatheral and Jacquier, 2014). For a strike K and a maturity T the app computes θT, φ(θT) and the total variance w at k=ln⁡(K/F), and prices calls and puts with the Black-Scholes formula at σ=w/T. Digital and asset-or-nothing options need the slope ∂C/∂K of the call price, which includes the slope of the smile. It is a central difference with a step of 10−4K. The density in the charts is the second difference of the call price in the strike (Breeden and Litzenberger, 1978) with a step of 0.5 % of the strike.

The calibration keeps γ between 0 and 12 through γ=12/(1+e−y) and ρ between −1 and 1 through ρ=tanh⁡y. A step that breaks η(1+|ρ|)≤2 is rejected like a step that raises the error, so the fitted surface stays free of static arbitrage. Implied volatilities and prices agree with QuantLib's SVI smile at the same parameters (Validation).

Two-asset options

Both assets follow geometric Brownian motions with constant volatilities and correlation. The exchange option (spread with K=0) has the exact formula of Margrabe. With a strike the spread uses Kirk's approximation, which treats S2+K as lognormal (Learn → Multi-Asset & Correlation). Its error grows with the strike.
Calls on the maximum and minimum of two assets use the closed form of Stulz, 1982 with the bivariate normal distribution function, computed with the algorithm of Genz, 2004 to about 10−15. The puts follow from parity on the maximum or minimum: a put is a zero bond paying K minus the call with strike 0 plus the call with strike K.
A basket a1S1+a2S2 is replaced by a lognormal variable with the same mean and variance and valued with the Black formula. This is accurate to a fraction of a per cent for moderate volatilities and maturities (Validation).
Quanto, composite and foreign options are Black-Scholes prices with adjusted inputs: for the quanto the dividend yield q1+r−q2+ρσ1σ2, for the composite the spot S1S2 and the volatility σ12+σ22+2ρσ1σ2, for the foreign option the foreign rate q2 and the value converted at S2.
Greeks by central differences of the price: spots by 0.1 %, volatilities by 0.01 points, the correlation by 0.0001, the cross gamma from four revaluations.

Greeks

Black-Scholes instruments: analytic formulas up to third order (Learn → Greeks).
Path-dependent options: finite differences of the closed-form price.
American options: finite differences of the grid value, theta from the Black-Scholes equation. Next to a barrier the spot bump is one-sided, away from the barrier, so that it does not cross it.
Two-asset options: finite differences of the price (Methods → Two-asset options).
Other Models: finite differences of the model price. Vega shifts all volatility parameters of the model in parallel. NIG and CGMY have no single volatility parameter. SSVI has no dynamics, so its spot Greeks assume that the smile moves with the forward (Learn → Other Models).