Antithetic Variates
Using each standard normal draw twice, as z and as minus z, and averaging the two payoffs makes the errors of the pair partly cancel. How much the standard error falls depends on the payoff: a lot for a deep in-the-money call, almost nothing far out of the money.
The question
The standard error shrinks with the square root of the number of paths, which makes a smaller error expensive. Is there a cheaper way? One trick is to use every random draw twice. If z is a draw, so is minus z, and the two prices at expiry lie on opposite sides of the middle. If one payoff is a high miss, the other tends to be a low one, and their average misses less.
The estimate built from such pairs is called antithetic, from the Greek for opposed. It is still an average of payoffs; only the draws are arranged in pairs. This lesson compares the standard error of plain and antithetic estimates for three strikes.
Work it by hand
Take spot 100, rate 0.05, volatility 0.2 and one year. For z = 1 the price at expiry is 100 exp(0.03 + 0.2) = 125.86, and for z = -1 it is 100 exp(0.03 - 0.2) = 84.37.
For a call with strike 60 the payoffs are 65.86 and 24.37. Each alone is far from the average of the two, 45.11, and from the other: a plain estimate that happens to draw z = 1 sees 65.86, and one that draws z = -1 sees 24.37. The pair always gives 45.11 whichever sign comes first, so this part of the scatter is gone.
For a call with strike 130 both payoffs are 0, and the pair has nothing to cancel. The gain depends on the payoff.
Run it
The program takes pairs pairs and a list of strikes. For each strike it prices the call twice with the same seed: with pricing.monte_carlo_plain for 2 * pairs prices (line 7) and with pricing.monte_carlo for pairs pairs (line 8), so that both use the same number of prices at expiry. It keeps the two standard errors in cents with one decimal (lines 10 and 11) and returns them with the strikes (lines 15 to 17). Line 18 returns the closed form of the second strike in whole cents.

let m = model.black_scholes(spot, rate, 0.0, vol);
let label = str_list();
let plain = float_list();
let anti = float_list();
for (i in range(0, strikes.len())) {
let call = instrument.european_call(strikes.at(i), 1.0);
let a = pricing.price(call, m, pricing.monte_carlo_plain(2 * pairs, seed));
let b = pricing.price(call, m, pricing.monte_carlo(pairs, seed));
label.add(lmf.money(strikes.at(i)));
plain.add(lmf.round(a.stderr() * 100.0, 1));
anti.add(lmf.round(b.stderr() * 100.0, 1));
}
let mid = instrument.european_call(strikes.at(1), 1.0);
let exact = pricing.price(mid, m, pricing.analytic()).price();
lmcode_return_put("label", label);
lmcode_return_put("plain", plain);
lmcode_return_put("anti", anti);
let answer = int(math_round(lmf.round(exact, 2) * 100.0));
{
"answer": 1045,
"label": [
"60.00",
"100.00",
"130.00"
],
"plain": [
20,
14.5,
6
],
"anti": [
4.1,
10.4,
5.9
]
}With 5,000 pairs and seed 42 the standard errors in cents are, for strikes 60, 100 and 130: plain 20.0, 14.5 and 6.0; antithetic 4.1, 10.4 and 5.9. The gain is large at 60, smaller at 100, and nothing at 130. Another seed gives other numbers.
You can change pairs, seed, the inputs of the option and the list of strikes.
The list needs at least two numbers because line 13 reads the second; with one, line 13 stops with "FloatList.at: index out of range: 1". The picture shows the first 16 strikes.
pairs must be from 16 to 2000000: 1 to 15 stop line 8 with "pricing.monte_carlo: paths must be 16..100000000", 0 stops line 7 with "monte carlo: paths must be 1..4000000, got 0", and 2000001 stops line 7 with "monte carlo: paths must be 1..4000000, got 4000002". A seed of 0 stops line 7 with "pricing.monte_carlo_plain: seed must be 1..2147483647 (0 would mean a clock-based seed), got 0".
A strike of 0 or less stops line 6 with "option strike must be positive", and a spot or a volatility of 0 or less stops line 1 with "model.black_scholes: spot must be positive" or "model.black_scholes: volatility must be positive". Inputs far outside any sensible range stop the run as well: a rate of 800 stops line 10 with "Result.stderr: this engine does not provide it; use the risk functions (bumped Greeks)".
Your turn
The list draws holds standard normal numbers. The program below is meant to return the antithetic estimate of the call, in whole cents: for each draw z, the average of the call payoff at the price S exp(a + v z) and at S exp(a - v z), where a = rate - vol^2 / 2; then the average over the list, discounted for one year at the continuous rate.
Decide whether it does, and find the candidates that do. Check runs each candidate on the data shown and on four others.

let curve = market.flat_curve_compounded(rate, "continuous");
let call = instrument.european_call(strike, 1.0);
let a = (rate - vol * vol / 2.0);
let total = 0.0;
for (i in range(0, draws.len())) {
total = total + call.payoff(spot * lmf.exp(a + vol * draws.at(i)));
}
let mean = total / float(draws.len());
let value = lmf.round(mean * curve.discount(1.0), 2);
let answer = int(math_round(value * 100.0));
{
"answer": 1082
}The list draws holds standard normal numbers. For each draw z let a = rate - vol^2 / 2 and take the two prices at expiry spot * exp(a + vol * z) and spot * exp(a - vol * z) for one year. Return the antithetic estimate of the call with the given strike, in whole cents: the average over the list of the average of the two call payoffs, multiplied by the discount factor of one year at the continuously compounded rate. Check runs each candidate on the data shown and on four others.
Read the result carefully
The gain is a property of this payoff in this model. At the strike 130 the two standard errors in the demo are 6.0 and 5.9 cents: no gain. A variance reduction trick does not remove the sampling error, and it does nothing about the model's assumptions of a constant volatility and no costs.
In the exercise the draws are given numbers, so the answer is an exact calculation.
The antithetic engine always pairs its draws; there is no switch for it, and its number of paths counts pairs, not prices. Money answers are whole cents because the engine works in binary floating point, where numbers such as 1.1 or 105.05 have no exact form and a raw result can end in a stray digit; the page rounds with lmf.round before it shows or compares. It is a description of an arithmetic model and not investment advice.
Recap
- An antithetic estimate uses each draw z twice, as z and as -z, and averages the two payoffs.
- With the same number of prices at expiry the standard error of a deep in-the-money call falls a lot.
- Far out of the money, where both payoffs of a pair are zero, it hardly changes.
- The trick shrinks the sampling error only for some payoffs and leaves the model's assumptions as they are.