Valuing European Options Using Monte Carlo Simulation-Derivative Pricing in Python

Subscribe to newsletter

In a previous post, we presented a methodology for pricing European options using a closed-form formula. In this installment, we price these options using a numerical method. Specifically, we will use Monte Carlo simulation.

Recall that,

  • A call option gives the buyer the right, but not the obligation to buy an agreed quantity of the underlying from the seller at a future time for a given price. The payoff of the call option at expiration is max(ST-K,0),
  • A put option gives the buyer the right, but not the obligation to sell an agreed quantity of the underlying to the seller at a future time for a given price. The payoff of the put option at expiration is max(K -ST,0),

where ST  denotes the stock price at expiration and K is the strike price.

Subscribe to newsletter https://harbourfrontquant.beehiiv.com/subscribe Newsletter Covering Trading Strategies, Risk Management, Financial Derivatives, Career Perspectives, and More

To price these options, we first simulate the price paths using the following Stochastic Differential Equation:

Monte Carlo simulation in pythonwhere

  • St is the stock price at time t,
  • σ denotes the stock volatility,
  • µ is the drift which equals the risk-free rate, and
  • dWt represents the standard normal random variable.

The simulation is carried out until the options’ maturity. We then apply the terminal payoff functions and calculate the mean values of all the payoffs. Finally, we discount the mean values to the present and thus obtain the option values.  For a more detailed presentation of the Monte Carlo method, see Reference [1].

The picture below shows the call and put option prices using 100000 simulations. All other parameters are the same as in the previous post.

options pricing in Python using Monte Carlo

We compare the above results to the ones obtained by using a third-party software and notice that they are in good agreement.

derivative pricing in python

In the next installment, we will present a methodology for pricing American options using Monte Carlo simulation.

References

[1] Glasserman, Paul; Monte Carlo Methods in Financial Engineering, Springer; 2003


To download the accompanying Excel workbook or Python program for this post:
1. Subscribe to the newsletter. If you're already a subscriber, go to the next step
2. Once subscribed, refer a friend
After completing these steps, you’ll gain access to the file for this post, along with files for a dozen other posts.

Subscribe to newsletter https://harbourfrontquant.beehiiv.com/subscribe Newsletter Covering Trading Strategies, Risk Management, Financial Derivatives, Career Perspectives, and More

Further questions

What's your question? Ask it in the discussion forum

Have an answer to the questions below? Post it here or in the forum

LATEST NEWSWalmart's former U.S. CEO Bill Simon thinks retailer can easily absorb tariff costs, criticizes its 'doom and gloom' commentary
Walmart's former U.S. CEO Bill Simon thinks retailer can easily absorb tariff costs, criticizes its 'doom and gloom' commentary

Bill Simon, who ran Walmart from 2010 to 2014, suggests the company may be overstating challenges tied to tariffs.

Stay up-to-date with the latest news - click here
LATEST NEWSIncome Financial Declares Monthly Distribution
Income Financial Declares Monthly Distribution

TORONTO, May 21, 2025 (GLOBE NEWSWIRE) — Income Financial Trust (“Income Financial”) declares its monthly distribution of $0.06642 per unit. The distribution is payable June 10, 2025 to unit holders on record as at May 30, 2025. Under the distribution policy announced on November 18,…

Stay up-to-date with the latest news - click here
LATEST NEWSTop Aces celebrates 25 years of excellence in fighter pilot training
Top Aces celebrates 25 years of excellence in fighter pilot training

A Canadian legacy of elevating global air combat readiness MONTREAL, May 21, 2025 (GLOBE NEWSWIRE) — Top Aces Inc., the world’s premier provider of live-fly Adversary Air (ADAIR) and Close Air Support (CAS) training, is proudly celebrating its 25th anniversary of service. Founded in Montreal…

Stay up-to-date with the latest news - click here
LATEST NEWSOpus One Gold Obtains 3.79 g/t Gold Over 6.7 m at 57 m From Hole NO-25-03 on its Zone 1 Gold Discovery, Noyell Project
Opus One Gold Obtains 3.79 g/t Gold Over 6.7 m at 57 m From Hole NO-25-03 on its Zone 1 Gold Discovery, Noyell Project

NOT FOR DISTRIBUTION TO U.S NEWSWIRE SERVICES OR FOR DISSEMINATION IN THE UNITED STATES MONTREAL, May 21, 2025 (GLOBE NEWSWIRE) — Opus One Gold Corp (TSX-V: OOR) (the “Company” or “Opus One”) is pleased to announce that drill hole NO-25-03 from the winter drilling program on…

Stay up-to-date with the latest news - click here
LATEST NEWSMS Canada Invites All Canadians to Sign Up For The 2025 MS Walk, Happening This Sunday, May 25
MS Canada Invites All Canadians to Sign Up For The 2025 MS Walk, Happening This Sunday, May 25

Communities across the country will come together for the one-day event to raise awareness and funds for multiple sclerosis (MS) research and support programs that improve the well-being of Canadians living with MS Toronto, ON, May 21, 2025 (GLOBE NEWSWIRE) — MS Walk is a…

Stay up-to-date with the latest news - click here

One Response

Leave a Reply