Speed

N(d1), N(d2) and the Price

The call price is spot times N(d1) minus the discounted strike times N(d2); N(d2) is the model's probability that the call ends in the money and N(d1) is the hedge ratio, which the engine calls delta.

The question

d1 and d2 are distances in standard deviations. To turn them into a price the formula needs the cumulative normal distribution, N(x), the probability that a standard normal number is below x. How is the call price built from N(d1) and N(d2), and what does each of the two numbers N(d1) and N(d2) mean?

The call price is spot times N(d1) minus the strike times e to the power of minus rate times years times N(d2).

Work it by hand

Use the example of the book: spot 100, strike 105, rate 0.05, volatility 0.2, one year, so d1 is 0.106049 and d2 is -0.093951. A normal table gives N(0.106049) = 0.5422 and N(-0.093951) = 0.4626.

The first term is 100 times 0.5422 = 54.22. The discount factor is e to the power of -0.05, 0.9512, so the second term is 105 times 0.9512 times 0.4626 = 46.20. The price is 54.22 minus 46.20, which is 8.02. The table values are rounded to four decimals, so the hand result agrees with the engine's to the cent only.

Run it

The program takes d1 and d2 from the engine, pricing.bs_d1 and pricing.bs_d2, and applies the normal distribution, lmf.norm_cdf, in lines 5 and 6. Line 7 is spot times N(d1) and line 8 is the discounted strike times N(d2), with lmf.exp for the discount. Their difference is the formula's price, and line 9 asks the engine for the call price and its delta.

N(d1) 0.542228, N(d2) 0.462574, the first term 54.22, the second term 46.2, the formula price 8.02, the engine price 8.02 and the engine delta 0.542228.
let m = model.black_scholes(spot, rate, 0.0, vol);
let call = instrument.european_call(strike, float(years));
let d1 = pricing.bs_d1(call, m);
let d2 = pricing.bs_d2(call, m);
let n1 = lmf.norm_cdf(d1);
let n2 = lmf.norm_cdf(d2);
let first = spot * n1;
let second = strike * lmf.exp(0.0 - rate * float(years)) * n2;
let priced = pricing.price(call, m, pricing.analytic());
lmcode_return_put("n1", lmf.round(n1, 6));
lmcode_return_put("n2", lmf.round(n2, 6));
lmcode_return_put("first", lmf.round(first, 2));
lmcode_return_put("second", lmf.round(second, 2));
lmcode_return_put("formula", lmf.round(first - second, 2));
lmcode_return_put("engine", lmf.round(priced.price(), 2));
lmcode_return_put("delta", lmf.round(priced.delta(), 6));
let answer = int(math_round(lmf.round(first - second, 2) * 100.0));
{
  "answer": 802,
  "n1": 0.542228,
  "n2": 0.462574,
  "first": 54.22,
  "second": 46.2,
  "formula": 8.02,
  "engine": 8.02,
  "delta": 0.542228
}

The picture shows N(d1) and N(d2), the two terms, the price of the formula, the price of the engine and the engine's delta. With a dividend yield of 0, as here, the delta equals N(d1) to the digits shown. Line 17 returns the price of the formula in whole cents.

You can change the four inputs and the years, a whole number of 1 or more. The stops are the engine's, as in the first lesson: a volatility or a spot of 0 stops line 1, a strike or a number of years of 0 stops line 2.

Your turn

N(d2) is the probability, under the pricing model, that the call finishes in the money. The program below is meant to return that probability in whole basis points, which is N(d2) times 10000 rounded to a whole number, for spot, strike, rate, vol and years. Decide whether it does, and find the candidates that do. Check runs each candidate on the data shown and on four others.

The inputs spot 80, strike 100, rate 0.03, volatility 0.25 and 4 years, and the number 5174, the basis points that the shown program returns.
let m = model.black_scholes(spot, rate, 0.0, vol);
let call = instrument.european_call(strike, float(years));
let d1 = pricing.bs_d1(call, m);
let p = lmf.norm_cdf(d1);
let answer = int(math_round(lmf.round(p, 4) * 10000.0));
{
  "answer": 5174
}

Return, in whole basis points, the probability under the Black-Scholes pricing model that the European call finishes in the money: N(d2) times 10000, rounded to a whole number. No dividend.

Read the result carefully

N(d2) is a probability under the pricing model, in which the stock grows at the risk-free rate, a name for a model input. It is not a forecast of how often such an option will pay: with another expected growth the frequency would differ and the price would not.

The page also does not say that N(d1) is a probability of anything; here it is the hedge ratio, the slope of the price with spot. The inputs are made up, and the page describes a model and is not investment advice.

Recap

  • The call price is spot times N(d1) minus the discounted strike times N(d2).
  • N(d2) is the model's probability that the call ends in the money.
  • N(d1) is the engine's delta when the dividend yield is 0.
  • lmf.norm_cdf is the normal distribution function.