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 minus their value today, , not discounted.
The unhedged figures of the Hedge Simulator use the same , but in today's money: their P&L is (Learn → Risk & Return).
Every position is revalued with Black-Scholes at its remaining maturity 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 the spot grows at only, because the underlying pays out . 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 and earn the rate until the horizon. Per unit this gives the amount by which the forward lies below the financed spot. The underlying then earns the rate like every other position, in line with cash and carry: buying the underlying and selling it forward is riskless and must return .
Example with , , and : the expected price gain is , the dividends are , together .
is a fixed amount. With units of the underlying it shifts the P&L by : 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 , while the formulas show the pure payoff. The P&L Attribution and the Payoff Builder work with values only, without dividends.
Probabilities
is the risk-neutral measure of Black-Scholes: the spot at is lognormal and grows at . Probabilities under are prices, not forecasts (Learn → Black-Scholes).
For a single option the three probabilities of the Positions table are in closed form: for calls and puts, and and are the probabilities that the payoff exceeds today's price or , which is at the strike shifted by that amount.
For the portfolio the three are measured at the horizon 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 of each position. The probabilities are then marked with ≈.
The unhedged probability in the Hedge Simulator is computed in the same way, with the drift , the realised volatility and the P&L in today's money. With and a realised volatility equal to the implied one it is the of the portfolio row.
Hedge Simulator
Paths. The spot is simulated under with drift and volatility on the rebalancing dates, one every up to the horizon 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 .
Hedge. On every date the hedge is set to minus the Black-Scholes delta of the portfolio at implied volatility. Each trade pays 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 as well.
Cash earns , all shares held (the hedge and the underlying positions) earn the dividend yield 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 , so small differences remain with few rebalances. The values after costs marked with ≈, including , 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 with values . The fit combines cash , units of the underlying and calls with quantities at strikes : Calls are enough for any payoff (Learn → Static Replication). For given strikes is linear in , so the best quantities follow from least squares:
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 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 paid at maturity, with the call prices . 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 , where is their quantity of the underlying. A unit of the underlying costs and pays dividends in addition to , and this is the present value of those dividends (Methods → P&L at the horizon).
Solver
The solver finds every value of the unknown input with It evaluates on a grid of 800 steps over the whole range, logarithmic for and and linear for and , and refines every change of sign by bisection. Every local extremum of 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: to times the strike for and times the spot for , up to 50 years, up to 500 %, and between −50 % and 50 %.
With each solution the solver shows the sensitivity , from a central difference, and the change of the solution when the target value rises by 1 %, . At a maximum or minimum of the target, where , it says so instead.
Calibration
The calibration in Other Models minimises 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 .
Each iteration linearises the scaled errors around the current parameters . With the Jacobian , computed by forward differences, a step changes the errors by about . Minimising the linearised sum of squares gives the Gauss–Newton step . 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: 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 ), or the relative improvement falls below . This is the usual end, mostly after fewer than 20 iterations.
Exact fit: the error sum falls below , 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 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 and , for a put with and , 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 lowers the spot by on the ex-date. The value just before the ex-date is the value just after it at , or the intrinsic value if that is larger. The dividend yield 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: 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 with , , the fractional derivative and the fractional integral . The Fourier integrals need it at and (Learn → Numerical Methods).
Time steps. The fractional Riccati equation has no solution in closed form. It is solved in its integral form , with 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 on Gauss–Legendre panels and then used for all strikes. The panels widen with the frequency until falls below . For a strike far from the forward they stay narrow, so that the oscillating factor 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 , a large and close to , mostly far from the money and for very short maturities, where the Adams method is known to be inaccurate (Boyarchenko and Levendorskiĭ, 2024). With the price agrees with the closed-form Heston price (Validation).
SSVI
SSVI gives the implied volatility directly (Gatheral and Jacquier, 2014). For a strike and a maturity the app computes , and the total variance at , and prices calls and puts with the Black-Scholes formula at . Digital and asset-or-nothing options need the slope of the call price, which includes the slope of the smile. It is a central difference with a step of . 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 through and between −1 and 1 through . A step that breaks 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 ) has the exact formula of Margrabe. With a strike the spread uses Kirk's approximation, which treats 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 . The puts follow from parity on the maximum or minimum: a put is a zero bond paying minus the call with strike 0 plus the call with strike .
A basket 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 , for the composite the spot and the volatility , for the foreign option the foreign rate and the value converted at .
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).
See also:
Validation – how the prices on this site are checked against QuantLib and Monte Carlo
References – the papers behind the formulas