Validating Monte Carlo Option Pricing with Independent Benchmarks
Summary
The document discusses how to check a Python Monte Carlo option-pricing model. It cautions that rebuilding the same method in a spreadsheet may reproduce the same conceptual or implementation error. A more independent check is to price a European option and compare the simulation estimate with the Black–Scholes analytical value, where that benchmark applies.
It also recommends examining how estimated standard error changes as the number of simulation paths increases: under the central limit theorem, it should decline in proportion to the inverse square root of the path count. Visual checks of simulated spot-price distributions can reveal unexpected trends or asymmetry, and changing drift provides a way to inspect how the distribution responds to parameters. Another independent implementation can provide an additional comparison. These checks complement one another; overlapping confidence intervals alone do not establish correctness, and the analytical benchmark is limited to products and assumptions for which a suitable formula is available. The answer offers a validation workflow rather than a universal numerical tolerance.
Key ideas
- Use an analytical price such as Black–Scholes to benchmark Monte Carlo estimates when the product permits it.
- Check whether standard error falls at the expected inverse-square-root rate as simulation paths increase.
- Inspect simulated price distributions and test how they change when model parameters such as drift are varied.
- Independent implementations can help expose mistakes shared by two versions of the same code.
- A numerical comparison is meaningful only when the benchmark and model assumptions are appropriate.
Tags
Full text
# Testing a Monte Carlo simulation independently # Testing a Monte Carlo simulation independently I'm building a Monte Carlo option pricing model in Python/SciPy. I want to test the results produced by the Python code by building the model independently in Excel and then comparing the results. Off course the values won't match exactly, but what is close enough? My idea is to calculate the standard error and then calculate the range on a 95% confidence level where the true mean lies for both implementation. If these two ranges overlap then it is close enough. I'll also do enough simulations so that the standard error is less than 2% of the estimated mean. Alternatively I can generate the random numbers in Python and feed that into Excel for a type of quasi Monte Carlo. Or I might be able to to give it the same seed (but I'm not sure if this will work). Is my approach described above sound or what other options are there? ## Answer by SmallChess (score 5, accepted) https://quant.stackexchange.com/a/21687 I wouldn't repeat the same algorithm on Excel, because if you make a mistake in your Python code, it's likely that you'll also make the same mistake in your Excel code. Quants usually test an implementation with an analytical formula (not always possible). You should start off with something easy by pricing an European option with your MC algorithm. You should compare your MC price with Black-Scholes. Note that you don't have to code the formula yourself, google "online black scholes calculator". Do some runs, plot the standard errors against N where N is the number of iterations. Make sure the standard errors from your MC drop by an inverse square root of N (central limit theorem). Data visualisation is your friend. Plot the distribution of the spot price against time. Do they have a trend? You should see a trend unless your drift is zero. Now, change the drift to zero, do you see a normal distribution? Does the plot look symmetric? The key to model validation is a deep understanding of the underlying distribution and what would it look like if you change the parameters. You can also compare your MC with an MC implementation from somebody else. Generally, you should validate your results with an implementation that is done independently (i.e.: not you).
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.