Quants and traders who run valuation models fit the model to options whose prices are visible in the market, and only then value instruments with no market price. When the parameters move a lot from day to day, the risk of poor hedges increases.

Fitting a model's parameters to market prices

You use a model in valuation to find values for instruments with no market price, and the prices of instruments that do have one are fed into the model as inputs. Heavily traded options, such as call and put options on major indices, currencies, and stocks, have observable market prices, so you use those prices as inputs instead of the model's values. Calibration is the procedure of choosing the parameters so that the model's prices match those market prices1. The calibrated model then prices exotic options traded over the counter and thinly traded options. The model works as a rule for extending prices from instruments whose prices are visible to instruments whose prices are not, in a way that creates no arbitrage opportunity1.

Calibration reverses the direction of pricing: it solves for the parameters from market prices, which mathematics calls an inverse problem2. Implied volatility is the same kind of reverse calculation, because it backs out the volatility at which the Black-Scholes price equals the market price. It is the case where the only parameter is the volatility. The procedure is covered in Implied Volatility.

You can also estimate parameters from past price movements. For a stochastic volatility model, however, estimating from the underlying's prices alone does not give correct derivative prices. The market price of volatility risk cannot be estimated from the underlying's past prices. If you fit to the volatility smile of vanilla options, this value is already built into the market prices, so it does not need a separate estimate3. A paper on the Heston model states that what is used in real-time pricing and risk management is fitting to the volatility surface at a given moment4.

How to choose the input instruments

Choose the input instruments from those whose prices are observable in the market and that are used to hedge the instrument being valued. The standard approach to calibrating stochastic volatility is to search for the parameters that minimize a weighted error against the prices of vanilla options with different maturities and strikes. The instruments used are those used to build the volatility surface, and they are the same instruments traders use to hedge their positions5. In a study of FX barrier options, a barrier option with an 18-month maturity was calibrated using seven maturities, from 1 month to 2 years. These were combined with five quotes: the 10-delta put and call, the 25-delta put and call, and at-the-money. That makes 7 × 5 = 35 implied volatilities, to which the Heston model was fitted6.

The inputs can also change from one trade to the next. An exotic that pays every 6 months for 2 years is not hedged with 2-year vanillas alone, so it makes more sense to fit to vanillas of several maturities7.

In interest rate models, different inputs sometimes determine different parameters. In market models such as the LIBOR market model (LMM), the prices of the caplets of a market interest rate cap set the level of the forward rate volatilities. A commonly used approach is then to determine the individual volatilities from swaption prices or from the correlations of historical forward rates, subject to the caplet constraints. Swaption prices also depend on the correlations between forward rates, so caplets alone do not determine the correlations8.

How quickly the model can produce a price also affects the choice of inputs, because prices are recomputed every time the parameters change. Swaptions with an analytical approximation are easy to use as inputs, while a model that can be priced only by Monte Carlo simulation takes a long time to fit8.

How to measure the error and minimize it

Calibration is solved as a problem of summing the differences between model and market prices into a single number and searching for the parameters that minimize it. The formula that produces this number is called the objective function. A common choice is the sum, over instruments, of the squared difference multiplied by a weight910.

The steps are as follows.

  1. Collect the market prices of the input instruments.
  2. Compute model prices for the same instruments with the current parameters.
  3. Measure the error against the market prices with the objective function.
  4. If the error is large, move the parameters and return to step 2.
  5. Once the error is small, fix the parameters and use them to value other instruments that have no market price.

Write θ\theta for the parameters taken together, Ci(θ)C_i(\theta) for the model price of instrument ii, Ci∗C_i^{*} for its market price, and ωi\omega_i for its weight. The objective function is then:

f(θ)=∑i=1nωi(Ci(θ)−Ci∗)2f(\theta) = \sum_{i=1}^{n} \omega_i \left( C_i(\theta) - C_i^{*} \right)^2

Calibration searches for the θ\theta that minimizes this f(θ)f(\theta)11. In calibrating the Heston model, there are far more instruments than parameters, so there are more equations than unknowns (the source's term is "overdetermined")10. The value of the objective function measures how large the gap between model and market prices is.

Instead of price differences, you can also measure differences in implied volatility. Volatilities are of similar size across instruments, but prices can differ by several orders of magnitude between in-the-money and out-of-the-money options. Weights can also put more emphasis on the fit near at-the-money or out-of-the-money12. Instead of a sum of squared differences, the error can also be measured as the largest or the total of the absolute differences13.

The sources use the following methods for the minimization.

Method How the sources use it
Methods that use the gradient (the slope of the objective function) Normally used for least squares in jump-diffusion models9
Levenberg-Marquardt method Used for least squares over the five parameters of the Heston model. An analytical gradient makes it about 10 times faster than a numerically computed gradient14
Simplex search Used to fit three parameters of the Heston model to an FX smile12

Gradient-based methods need the gradient of the objective function, and Adjoint Algorithmic Differentiation (AAD) can be used to compute it. How the computation works is covered in Adjoint Algorithmic Differentiation (AAD).

Calculation example: fitting a flat volatility

Consider a hypothetical example in which a call with an underlying price of 100 and a maturity of 1 year has implied volatilities of 18%, 20%, and 23% at strikes 90, 100, and 110. Fit a model whose only parameter is a flat volatility σ\sigma. The objective function is a weighted sum of squared volatility differences, which is the formula above with CiC_i replaced by the implied volatility.

For this model, the σ\sigma that minimizes the objective function is the weighted average of the market volatilities. With all three weights equal to 1, it is (18+20+23)/3=20.33(18 + 20 + 23) / 3 = 20.33 (%). With a weight of 4 on at-the-money, it is (18+4×20+23)/6=20.17(18 + 4 \times 20 + 23) / 6 = 20.17 (%).

Weights (90, 100, 110) σ\sigma (%) Difference: strike 90 (percentage points) Difference: strike 100 (percentage points) Difference: strike 110 (percentage points) Weighted sum of squares
1, 1, 1 20.33 2.33 0.33 −2.67 12.67
1, 4, 1 20.17 2.17 0.17 −2.83 12.83

Each difference is the model volatility minus the market volatility. A flat volatility cannot reproduce all three implied volatilities at once, so an error remains. With a weight of 4 on at-the-money, the difference at that strike shrinks from 0.33 to 0.17. The difference at strike 90 also shrinks, from 2.33 to 2.17, but the difference at strike 110 widens from −2.67-2.67 to −2.83-2.83. The choice of weights changes the fitted result15.

Deep diveWhy the minimum of the weighted sum of squares is the weighted average

Write yiy_i for the market implied volatilities. The objective function is f(σ)=∑iωi(σ−yi)2f(\sigma) = \sum_i \omega_i (\sigma - y_i)^2. Differentiate with respect to σ\sigma and set the result to 0.

dfdσ=2∑iωi(σ−yi)=0\frac{df}{d\sigma} = 2 \sum_i \omega_i (\sigma - y_i) = 0

Solving for σ\sigma gives the weighted average:

σ∗=∑iωiyi∑iωi\sigma^{*} = \frac{\sum_i \omega_i y_i}{\sum_i \omega_i}

ff is a quadratic in σ\sigma with a positive coefficient on the square, so this point is the minimum.

SimulatorFitting market volatilities by least squares (flat volatility and a straight line)
Inputs
Model to fit
%
%
%
18192021222390100110Implied volatility (%)Strike18.0020.0023.00
  • Fitted model (Flat volatility (σ))
  • Market

Market and model by strike (volatility, %)

StrikeMarketModelDifferenceWeight
9018.0020.332.331
10020.0020.330.331
11023.0020.33−2.671
σ (%)
20.33
Weighted sum of squares (objective)
12.67
Sum of squared differences (unweighted)
12.67
Largest absolute difference (points)
2.67
For reference: flat volatility, weighted sum of squares
12.67
For reference: straight line, weighted sum of squares
0.17

Simplifications

  • The model is fitted to the three implied volatilities at strikes 90, 100 and 110. For flat volatility, the σ that minimizes the weighted sum of squares is the weighted average of the market volatilities. The straight line a + b·x, where x is −1, 0 and 1 at strikes 90, 100 and 110, is fitted by weighted least squares.
  • The objective is the weighted sum of squared differences between the model and market volatilities. The difference is model − market, in points (%). The error is measured in volatility, not price.
  • When the model matches the market (zero differences), the two lines overlap on the chart.
  • Weights run from 1 to 10 and cannot be 0 (with a zero weight, the straight-line solution may not be unique).
  • These are simple shapes for explanation, not real models. Real calibration minimizes a non-linear model numerically and must deal with local minima, flat directions and day-to-day changes.

This simulator uses simplified calculations for learning. It cannot be used for valuing actual transactions or managing their risk. (Disclaimer)

About this simulator

Move the market implied volatilities at the three strikes and the weights, fit a flat volatility or a straight line, and see how the solution and the differences change. The initial values are those of the worked example above. Changing the at-the-money weight changes σ and how the differences spread across the strikes. Switching the model to the straight line brings the weighted sum of squares down to no more than that of the flat volatility, because the line includes the flat volatility. With equal weights, a is the average of the three and b is half the difference of the two ends. Raise all the market values together, then raise only the middle and right values: the first moves only a, and the second moves both a and b.

Stability of the solution and overfitting

The parameters that minimize the error are not always unique, and they do not always stay put when market prices change slightly. In a study of jump-diffusion models, applying squared-error minimization to the same prices gave very different results from different starting points. When the starting value of the jump intensity was changed between 1 and 5, the fitted jump distributions had different shapes16.

Even in the Merton model, which has few parameters, raising the jump intensity while lowering the diffusion volatility leaves the error at about the same level. The objective function has a flat direction along which the error barely changes. For numerical work, whether the objective function is convex matters more than the number of parameters17.

In the Heston model, the volatility of variance ξ\xi and the speed of mean reversion κ\kappa can offset each other, so different pairs can give a similar fit. Some studies report local minima, and others report convergence to a single solution regardless of the starting point; there is no consensus18. One paper attributes the local minima reported in earlier studies to an objective function shaped like a narrow valley with a flat bottom, combined with iterations stopped too early19. In interest rate market models, too, the sum of squares is generally not convex and has many local minima8.

Measures to stabilize the fit include the following.

  • Fix some of the parameters. Giving κ\kappa from outside in the Heston model is an example; the reasons are covered on the Heston model page20.
  • Add a penalty to the objective function. A study of jump-diffusion models adds to the error a penalty on the relative entropy with respect to a prior model, which makes the solution unique and stable21.
  • Add a penalty on the move from the previous parameters, or minimize locally starting from the previous parameters. Even the latter does not always keep the parameters from moving far, so range constraints are sometimes placed on the parameters22.
  • Bring the parameters to the same order of magnitude, or tighten the tolerance at which the iteration stops. In numerical experiments with the Heston model, the ratio of the curvature (second derivative) of the objective function along the κ\kappa and long-run variance directions was about 10−610^{-6}23.

Adding parameters to improve the fit raises the question of overfitting: has the model been fitted too closely to the input prices? A term structure of parameters gives the parameters different values for each maturity interval. The fit to market prices improves, but there are more parameters, and there are more chances for the model to become unstable in daily use24. Daily use raises three questions24.

  • Is the model overfitting?
  • Are the parameters stable from day to day?
  • How can the movements of those parameters be hedged?

A proposal to add jumps to the Heston model is likewise an example of getting a better fit at the cost of more parameters to fit from the same smile25.

Daily changes in parameters and hedging

When the market moves, the parameters change each time you recalibrate. As of a paper published in 2006, recalibrating the model whenever option prices moved was standard practice26. Recalibrating the Heston model every business day changes the parameters each time, and when the changes are large and frequent, the risk of poor hedges increases and the model becomes somewhat unstable, Le Floc'h notes27.

To continue the calculation example, the next steps use a simple form for illustration. Suppose the volatility is a straight line a+bxa + b x in the strike position xx (−1-1, 0, 1 for strikes 90, 100, 110). Each day, the parameters aa (level) and bb (slope) are fitted to the implied volatilities at the three strikes with equal weights. This is not a real model. Because xx is symmetric, aa is the average of the three and bb is half the difference between the two ends.

Day Market (strikes 90, 100, 110, %) aa (%) bb (percentage points) Sum of squared differences
Day 1 18, 20, 23 20.33 2.50 0.17
Day 2 19, 21, 24 21.33 2.50 0.17
Day 3 18, 20.5, 25 21.17 3.50 0.67

On day 2, all three prices rise by 1 percentage point, and only aa moves, by 1 percentage point. On day 3, compared with day 1, the middle rises by 0.5 percentage points and the right end by 2 points, so aa moves by 0.83 percentage points and bb by 1.00 point. Which parameters move, and how large the error is, depends on the shape of the market move.

Ways to limit large moves include the penalty from the previous section and local minimization from the previous parameters. Choosing the size of the penalty is the hard part. One way to decide is to size the penalty so that the total error with the penalty is twice the error without it. In that case, if the error without the penalty is small, the new parameters can move far from the previous ones. On the other hand, when the market moves a lot, the parameters must be able to move a lot, so the penalty must not be too strong either22. How often to recalibrate is also an issue. For a method that fits to all vanillas, if the prices of the reference vanillas have not moved, there is no reason to recalibrate on the spot28.

Model risk that remains after fitting

Reproducing the prices of all the input instruments does not guarantee that the model prices an exotic option correctly. Model risk shows up in the form of this discrepancy.

In a numerical example in the 2006 paper, a local volatility model is fitted to the call prices of a user-specified model with jumps, for maturities of 0.1 to 1 year and strikes within ±10% of the current price. The two models reproduce the call prices in this range at the same values. For example, the at-the-money call with a maturity of 0.2 years is 3.5408 in both. On the other hand, a knock-out call with a maturity of 0.2 years and a barrier of 110 is 2.73 in the local volatility model and 1.63 in the model with jumps. The difference of 1.10 is about 40% of the higher price. The paper attributes the difference to the local volatility model needing high short-term volatility to match the call prices29.

Which model you use changes the direction of the trade's mark-to-market. Consider a hypothetical example in which the buyer bought this knock-out call at 2.00. Valued with the 2.73 model, the buyer has an unrealized gain of 0.73 and the seller an unrealized loss of 0.73. Valued with the 1.63 model, the buyer has an unrealized loss of 0.37 and the seller an unrealized gain of 0.37. The prices of the input vanillas alone cannot decide which model represents the market.

A standard calibration procedure returns one solution, that is, one model. Alternatives are to calibrate each model class separately and compare the results, or to treat the solution as possibly non-unique and use a stochastic search to find several solutions30.

Notes

  1. Rama Cont, "Model uncertainty and its impact on the pricing of derivative instruments" (published in Mathematical Finance in 2006; this is the pre-publication version), section 3.2 "Benchmark instruments vs illiquid products" (page 11). ↩ ↩2

  2. Rama Cont and Peter Tankov, "Calibration of jump-diffusion option-pricing models: a robust non-parametric approach" (second version, September 2002), section 1 (page 3), "Calibration Problem 1". The source uses the term "inverse problem". ↩

  3. Janek et al., "FX smile in the Heston model" (2010), section 1.4.2 "The calibration scheme" (page 13). It covers the treatment of the market price of volatility risk λ\lambda. ↩

  4. Cui, del Baño Rollin, and Germano, "Full and fast calibration of the Heston stochastic volatility model" (second version, May 2016), section 2 (page 3). Of the two approaches, it describes the latter as the one for "real-time pricing and risk management". ↩

  5. Fabien Le Floc'h, "How to choose my stochastic volatility parameters? A review", section 2.1 "Textbook approach" (page 3). ↩

  6. Le Floc'h, same section (page 3). The example of FX barrier options from Griebsch and Pilz (2010) uses a "cross product". 35 is 7 × 5. ↩

  7. Le Floc'h, end of the "Live calibration vs. up-front calibration" section (page 7). The example is "a two year exotic contract paying every 6 months". ↩

  8. Martin Haugh, "Market Models" (Term Structure Models: IEOR E4710), "Calibration" section (page 9). Page 4 of the same source writes that the calibration of term structure models can use both historical data and market prices. ↩ ↩2 ↩3

  9. Cont and Tankov, section 3.1 "Non-linear least squares" (page 13), equation (30). It says that the weighted sum of squared errors, with weights ωi\omega_i, is usually minimized with gradient-based methods. ↩ ↩2

  10. Cui et al., section 3 (page 5), equations (2) to (5). It minimizes f(θ)=12∥r(θ)∥2f(\theta) = \frac{1}{2} \lVert r(\theta) \rVert^2, the sum of squares of the residuals ri(θ)=C(θ;Ki,Ti)−C∗(Ki,Ti)r_i(\theta) = C(\theta; K_i, T_i) - C^{*}(K_i, T_i), and writes that because "n ≫ m" (far more instruments than parameters), the problem is "overdetermined" (more equations than unknowns). ↩ ↩2

  11. The notation follows equation (30) of Cont and Tankov (weights ωi\omega_i). Cui et al. use no weights and multiply the whole expression by 12\frac{1}{2}. ↩

  12. Janek et al., section 1.4.2 (page 14). It writes about the reason for building the sum of squared errors (SSE) from volatility differences, that the weights can adjust the fit, that MATLAB's fminsearch (simplex search) is used for the minimization, and that v0v_0 and κ\kappa are fixed so that three parameters are fitted. ↩ ↩2

  13. Cont (2006), section 5 (page 24), equations (5.3) and (5.4). It lists the maximum and the sum of the absolute differences as norms of the difference between model and market prices for measuring the "calibration error". ↩

  14. Cui et al., abstract (page 1). It says the analytical gradient is about 10 times faster than the numerical gradient, and uses the Levenberg-Marquardt method. ↩

  15. The values in the table are rounded to two decimal places. The differences and the sums of squares come out the same when recomputed from the rounded differences (for example, for weights 1, 1, 1: 2.332+0.332+2.672=12.672.33^2 + 0.33^2 + 2.67^2 = 12.67). ↩

  16. Cont and Tankov, section 3.1 (pages 13 to 14), figure 1. This is an example of applying nonlinear least squares to DAX option prices. ↩

  17. Cont and Tankov, section 3.1 (page 14), figure 2 and the surrounding explanation. ↩

  18. Cui et al., section 2.1 "Recognised difficulties" (page 3). In the source's notation, the volatility of variance is σ\sigma and the long-run variance is vˉ\bar v; the former corresponds to ξ\xi on this site. ↩

  19. Cui et al., section 5 (page 22). It writes that the local minima are caused by a "narrow valley with a flat bottom and a premature stopping criterion". ↩

  20. Le Floc'h, section 2.2 "Fixing one parameter" (page 3). ↩

  21. Cont and Tankov, section 3.2 "Regularization" (page 14), equation (31). It adds a relative entropy penalty αF(Q,Q0)\alpha F(Q, Q_0) to the error and calls α\alpha the "regularization parameter". ↩

  22. Le Floc'h, section 2.3 "Further stabilization" (page 3). ↩ ↩2

  23. Cui et al., section 5 (page 24). It lists bringing the parameters to the same order of magnitude and tightening the tolerance as two remedies. The ratio 10−610^{-6} is the ratio of ∂2f/∂κ2\partial^2 f / \partial \kappa^2 to ∂2f/∂vˉ2\partial^2 f / \partial \bar v^2. ↩

  24. Le Floc'h, section 4 "Term-structure of parameters" (pages 5 to 6). The source calls the piecewise-constant form a term structure and lists three questions. "The question of overfitting" paraphrases the first one ("aren't we overfitting?"). ↩ ↩2

  25. Janek et al., section 1.5.2 "Jump-diffusion models" (page 19). It describes the proposals of Bates (1996) and others to combine jumps with stochastic volatility. ↩

  26. Cont (2006), section 6.3 "Updating with new information" (pages 28 to 29). ↩

  27. Le Floc'h, section 2.3 (page 3). ↩

  28. Le Floc'h, end of the "Live calibration vs. up-front calibration" section (page 7). This covers the case of "classical implied calibration". ↩

  29. Cont (2006), example 4.4 and table 1 (pages 19 to 20). The table shows, for the knock-out call with maturity 0.2 and barrier 110, 2.73 in the local volatility model, 1.63 in the model with jumps, and a difference of 1.1. 1.1 is about 40% of 2.73, and the paper writes "40% of its selling price". ↩

  30. Cont (2006), section 6.2 "Specifying the class of models" (page 28) and example 4.3 (page 18). Example 4.3 uses an evolutionary algorithm to search for several solutions. ↩