To calculate prices of European Call and Put options using the famous Black & Scholes method. Attempt has been made to perform this calculation even for Dividend paying stocks; though still need some improvements.
Black Scholes Method
We will calculate prices for European options by applying Black Scholes method. As per Investopedia:
"The Black-Scholes formula (also called Black-Scholes-Merton) was the first widely used model for option pricing. It's used to calculate the theoretical value of European-style options using current stock prices, expected dividends, the option's strike price, expected interest rates, time to expiration and expected volatility."
Black-Scholes method only works for European options as they can be exercised only on the expiry date.
As we can see, the required input for Black-Scholes method is same as the one we had downloaded and derived in Part-1 of this blog. Therefore, in this blog we will skip details on how to get historical asset prices and use them to calculate asset volatility.
Calculate Black-Scholes' d1 and d2
Now, we have all the underlying data; so let's aim to codify the above mentioned Black-Scholes equations. The famous d1 and d2 values can be calculated using the below code:
Once we have values for d1 and d2, we can plug these values in the overall equations for Call and Put option price as shown below:
If dividend is not zero, then it is subtracted from the risk free rate in the below calculations.
Calculating Call and Put option prices using Black-Scholes method
Running again for TSLA short-term option
In our previous blog, we ran Monte-Carlo simulations to calculate price of American option on TSLA stock expiring Sept 7th with Strike price of $370. We will use the same parameter here to calculate the price of European options using our above code.
Since the expiry is just a month ahead, prices of European options should be close to those of American ones. This is because time to expiry is short; giving lesser chance to the American option holder to exercise - the only difference between the two option types.
Once we run the code as available in my GitHub repository here; we get the following output.
Output of calculating European option prices using Black-Scholes
As we can see, these values are extremely close to the ones we got when running Monte-Carlo simulations. As a reminder, from that blog we got these values:
INFO: ### Call Price calculated at 11.162400
INFO: ### Put Price calculated at 25.102147
Prices compared - $11.159 vs $11.162 and $25.137 vs $25.102; it definitely looks we are consistent in our approach with these short duration options.
European Call and Put options must maintain a relationship called as Put-Call parity. As Investopedia explains here:
"Put-call parity is a principle that defines the relationship between the price of European put options and European call options of the same class, that is, with the same underlying asset, strike price and expiration date."
This must be true always; else there will be an arbitrage opportunity -i.e. returns without any risks. Basically, Put-Call parity states that below relationship must always be held:
CALLprice + PV( Strikeprice ) = PUTprice + SPOTprice
We can verify whether this parity holds using the below code:
Output for Put-Call parity
As we can see above, both European Call and Put option prices do maintain the Put-Call parity.
I am a passionate, driven polyglot programmer and architect with a knack of solving complex problems in quick and efficient way. Along with programming, software development, financial products, and management expertise, I also bring skills in statistical modeling, empowering me to work on challenging projects that require combination of software development and quantitative analysis.