Monte Carlo Option Price
Calculate European option prices through Monte Carlo simulation of Geometric Brownian Motion (GBM) stock price paths.
The Monte Carlo method prices an option by simulating a large number of possible future paths for the underlying stock price under the risk-neutral measure, computing the option’s payoff at expiration for each simulated path, and then discounting the average payoff back to the present.
The formula is as follows:
\[\Delta t = T / \text{Time Steps},\;\; \text{with Time Steps defaulting to 100}\] \[S(t + \Delta t) = S(t) \cdot e ^{(r - q - \sigma ^{2} / 2) \cdot \Delta t + \sigma \cdot \sqrt{\Delta} t \cdot Z}\] \[\text{Call Price} = e ^{- r \cdot T} \cdot \operatorname{MEAN}(\max(S(T) - K,\; 0)),\;\; \text{averaged over the simulated paths (10,000 by default)}\] \[\text{Put Price} = e ^{- r \cdot T} \cdot \operatorname{MEAN}(\max(K - S(T),\; 0))\] \[\text{Standard Error} = \text{Sample Standard Deviation} (\text{ddof} = 1) \text{of the Discounted Payoffs} / \sqrt{\text{Simulations}}\]Where S(t) is the stock price at time t (starting from the traded close on the pricing date), K is the strike price, r is the continuously compounded risk-free rate, q is the continuous dividend yield (ln(1 + dividend yield)), σ is the annualized volatility (the standard deviation of the daily returns over the trailing 252 trading days times √252), T is the time to expiration in years (days / 365) and Z is a standard normal random variable.
All strike prices of an expiry are priced on the same simulated paths (common random numbers), which keeps the prices consistent across strikes and means the paths are simulated once per expiry rather than once per strike.
As it is a simulation, the result comes with sampling error. Set show_standard_error=True to additionally return the standard error of each estimate - as a rule of thumb, the true price lies within plus or minus 2 times the standard error roughly 95% of the time. Pass a seed (as the example does) to make the results reproducible; without one every call draws new paths.
Also known as: Monte Carlo option pricing, simulation-based option pricing.
Monte Carlo Option Price in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_monte_carlo_option_price as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["COST"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2025-01-01",
end_date="2025-12-31",
)
monte_carlo = toolkit.options.get_monte_carlo_option_price(
strike_price_range=0.1, strike_step_size=10, expiration_time_range=31, seed=42
)
monte_carlo.loc["COST", ["2026-01-07", "2026-01-14", "2026-01-30"]]
Or, after setting up the Finance Toolkit MCP, ask:
What were calls on Costco worth at the end of 2025 in a Monte Carlo simulation of 10,000 price paths, for the expiries of 7, 14 and 30 January 2026 and strikes within 10% of the share price in $10 steps?
Which returns:
| Strike Price | 2026-01-07 | 2026-01-14 | 2026-01-30 |
|---|---|---|---|
| 780 | 82.8804 | 83.4929 | 85.5951 |
| 790 | 72.8944 | 73.6474 | 76.2377 |
| 800 | 62.9375 | 63.9365 | 67.1784 |
| 810 | 53.0608 | 54.449 | 58.4909 |
| 820 | 43.3668 | 45.3486 | 50.2675 |
| 830 | 34.0544 | 36.7989 | 42.5958 |
| 840 | 25.4476 | 28.9941 | 35.5519 |
| 850 | 17.9002 | 22.0923 | 29.1778 |
| 860 | 11.7131 | 16.2131 | 23.5449 |
| 870 | 7.0931 | 11.4623 | 18.6844 |
| 880 | 3.9774 | 7.8047 | 14.5854 |
| 890 | 2.0399 | 5.1208 | 11.2062 |
| 900 | 0.9613 | 3.2137 | 8.477 |
| 910 | 0.4226 | 1.935 | 6.285 |
| 920 | 0.1699 | 1.1307 | 4.5788 |
| 930 | 0.0583 | 0.6377 | 3.2783 |
| 940 | 0.018 | 0.3433 | 2.3104 |
Parameters
get_monte_carlo_option_price accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
start_date | str | None | The date whose price, volatility and rates the values start from; a date without prices (a weekend or a holiday) uses the last trading day before it, and a ticker without a price on that day is left out with a warning. Defaults to None, which uses the last date of the historical data. | "2021-01-01" |
put_option | bool | Whether to calculate the put option price. Defaults to False which means it will calculate the call option price. | True |
strike_price_range | float | The percentage range to use for the strike prices. Defaults to 0.25 which equals 25% and thus results in strike prices from 75 to 125 if the current stock price is 100. | 0.1 |
strike_step_size | int | The step size to use for the strike prices. Defaults to 5 which means that the strike prices will be 75, 80, 85, 90, 95, 100, 105, 110, 115 and 120 if the current stock price is 100. | 1 |
expiration_time_range | int | The number of days to use for the time to expiration: the columns are the expirations 1 up to expiration_time_range - 1 days after the start date. Defaults to 30, which gives expirations of 1 to 29 days. | 90 |
risk_free_rate | float | The risk free rate to use for the calculation. Defaults to None, which uses the Toolkit’s risk-free rate on the pricing date: the 10-year Treasury yield unless the Toolkit’s risk_free_rate parameter selects ‘13w’, ‘5y’ or ‘30y’, converted from its semi-annual bond-equivalent quote to continuous compounding. A rate passed here is used as given, as a continuously compounded rate. | 0.04 |
dividend_yield | float | The dividend yield to use for the calculation. Defaults to None, which uses the dividend yield on the pricing date (the dividends of the 365 days up to it relative to its close, as the continuously compounded ln(1 + q)). A given value is used as a continuous yield. | 0.02 |
simulations | int | The number of simulated stock price paths. Defaults to 10,000. | 1000 |
time_steps | int | The number of time steps used to build each simulated path. Defaults to 100. | 252 |
seed | int | None | The seed used to initialize the random number generator, ensuring reproducible results. Defaults to None, which means the results will not be reproducible. | 42 |
show_standard_error | bool | Whether to also return the standard error of each Monte Carlo estimate as a second DataFrame. Defaults to False. | True |
show_input_info | bool | Whether to show the input information. Defaults to False. | True |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
standardize | bool | Whether to standardize (Z-Score) the result across the time to expiration columns for each ticker and strike price. Defaults to False. | True |