LIVE· 2026-05-29
Three roads to one price
A C++ pricer where Black-Scholes, a binomial tree, and Monte Carlo all agree.
I wrote a compact C++20 pricer to implement three textbook approaches under a shared set of assumptions and test whether their results agree. This is numerical finance and validation work, not a claim to a new pricing model.
The closed form
Black–Scholes supplies the analytic benchmark: discount the spot by the dividend yield, discount the strike by the rate, and evaluate the normal-CDF terms. For the reference fixture—a one-year at-the-money call, 20% volatility, and 5% rate—the price is 10.4506. The numerical methods should approach that value when they use the same model inputs.
The lattice
The Cox-Ross-Rubinstein tree builds the price from the other end: discretise the world into up and down moves, then roll the risk-neutral expectation backwards from expiry. With ten steps its discretisation error is visible; by a thousand steps it is close to the closed form for the test fixture. For American exercise, each node compares continuation value with immediate exercise.
The dice
Monte Carlo simulates the terminal price directly and averages the payoff. The
catch is that a Monte Carlo point estimate is incomplete without its uncertainty.
The engine therefore reports a standard error, and the seeded test fixture
checks that the estimate falls within three reported standard errors of
Black–Scholes. Antithetic variates reuse each random draw as both +z and −z;
the implementation treats each pair mean as one sample when estimating uncertainty.
Why the error bar matters
This is the same discipline as the rest of my quantitative work: state the test conditions and report the uncertainty. A backtest needs a held-out window; a Monte Carlo estimate needs an error measure. The surrounding method matters as much as the displayed number.
The full implementation, tests, CMake configuration, and GitHub Actions workflow are in the public source repository. The case-study page documents the validation suite, reference output, and model limitations.