Speed

A Smile from the Model

In the Heston model with the example parameters the volatility read back from the call prices falls from 25.12% at strike 70 to 15.69% at strike 130: a smile that Black-Scholes, with one volatility, cannot draw.

The question

Price a call at each strike in the Heston model, then turn every price into a Black-Scholes volatility as in the last chapter. Is the line still flat?

It is not. The Heston model prices the calls, and the Black-Scholes formula only serves as a way of writing each price as a volatility. The example uses the fixed numbers of the book: spot 100, rate 5%, one year, v0 = 0.04, kappa = 1.5, theta = 0.04, sigma = 0.3 and rho = −0.7, which are made-up inputs. It is a description of an arithmetic model and not investment advice.

Work it by hand

Nobody prices Heston by hand: the price is an integral that the engine computes. What can be done by hand is to read the result. In the smile of the example, the volatility at strike 85 is 22.35% and at strike 115 it is 17.44%. The difference, low strike minus high strike, is 22.35 − 17.44 = 4.91 percentage points, that is 491 basis points.

A positive difference means that low strikes carry a higher volatility than high strikes. With a negative correlation between the price and the variance the model gives this slope: the variance rises when the price falls.

Run it

The program takes the strikes, the spot, the rate, the Heston parameters and compares with a flat volatility of 0.2. Lines 1 and 2 build the two models. Line 3 asks the engine, calibration.smile, for the Black-Scholes volatility implied by the Heston price at each strike. The loop from line 5 stores the rounded smile and the flat line for the picture. Line 9 builds an at-the-money call.

Lines 11 and 15 price it in both models; the program returns the Black-Scholes price in whole cents, and the Heston price is returned as heston_atm.

A curve of implied volatility against strike falling from about 25% at strike 70 to about 16% at strike 130, crossing a flat line at 20% near the money.
let h = model.heston(spot, rate, 0.0, v0, kappa, theta, sigma, rho);
let b = model.black_scholes(spot, rate, 0.0, 0.2);
let s = calibration.smile(h, strikes, 1.0);
let smile = float_list(); let flat = float_list();
for (i in range(0, strikes.len())) {
  smile.add(lmf.round(s.at(i), 4));
  flat.add(0.2);
}
let atm = instrument.european_call(spot, 1.0);
let engine = pricing.analytic();
let hp = pricing.price(atm, h, engine).price();
lmcode_return_put("smile", smile);
lmcode_return_put("flat", flat);
lmcode_return_put("heston_atm", lmf.round(hp, 2));
let bs = pricing.price(atm, b, engine).price();
let answer = int(math_round(lmf.round(bs, 2) * 100.0));
{
  "answer": 1045,
  "smile": [
    0.2512,
    0.2371,
    0.2235,
    0.2104,
    0.1976,
    0.1856,
    0.1744,
    0.1647,
    0.1569
  ],
  "flat": [
    0.2,
    0.2,
    0.2,
    0.2,
    0.2,
    0.2,
    0.2,
    0.2,
    0.2
  ],
  "heston_atm": 10.36
}

The Heston call at the money costs 10.36 and the Black-Scholes call 10.45; the smile runs from 25.12% at strike 70 to 15.69% at strike 130.

You can change every number: the parameters must keep the conditions of the last lesson (model.heston: v0, kappa, theta and sigma must be positive, model.heston: rho must be inside (-1, 1), both at line 1). Keep the strikes between about 60 and 150: far from the money the inversion is unreliable, and a strike of 20 gives 37.92% and one of 400 gives 17.68%.

Beyond about 450 the price is so small that the engine finds no volatility and the run stops at line 3 with "calibration.smile: no implied volatility at strike 450 (price -2.34683e-16 is outside the range reachable with volatility in [0.0001, 5])"; a strike of 0 stops there with "calibration.smile: strikes must be positive, got 0 at index 0", and a spot of 0 stops at line 1 with "model.heston: spot must be positive".

Your turn

A desk keeps a smile as two lists: strikes and vols, the implied volatility at each strike. It wants the skew: the volatility at the strike low minus the volatility at the strike high, in whole basis points. Both strikes are in the list. The program below is meant to return it. Decide whether it does, and find the candidates that do. Check runs each candidate on the lists shown and on six others.

Five strikes from 80 to 120, the five volatilities of the smile, the strikes 90 and 110, and the basis points that the shown program returns.
let a = vols.at(0);
let b = vols.at(vols.len() - 1);
let answer = int(math_round(lmf.round(a - b, 6) * 10000.0));
{
  "answer": 460
}

The lists strikes and vols are a smile, and low and high are two of its strikes. Return the skew in whole basis points: the volatility at the strike low minus the volatility at the strike high, where 100 basis points are 1 percentage point.

Read the result carefully

The smile comes out of the five inputs: other inputs give another smile, and the smile of this page says nothing about any real market. The engine prices the Heston model with its analytic engine only; it prices European options, and asking a Heston result for its delta stops with "Result.delta: this engine does not provide it; use the risk functions (bumped Greeks)".

The model has a constant rate, constant parameters and no jumps. The picture is what the model does, and it is not evidence that the model is right. Implied volatility far from the money is ill-conditioned, as the two extreme strikes show. It is a description of an arithmetic model and not investment advice.

Recap

  • In the Heston model the volatility implied by the call prices is different at different strikes: the line is no longer flat.
  • With rho = −0.7 low strikes have a higher implied volatility than high strikes in the example.
  • The Black-Scholes formula is only a way of writing each Heston price as a volatility.
  • The smile depends on the five inputs and is unreliable far from the money.