Black-Scholes options pricing

Options are the world's most widely used derivative to help manage asset price risk. In this exercise you'll price a European call option on IBM's stock using the Black-Scholes option pricing formula. IBM_returns data has been loaded in your workspace.

First you'll compute the volatility sigma of IBM_returns, as the annualized standard deviation.

Next you'll use the function black_scholes(), created for this and the following exercises, to price options for two different volatility levels: sigma and two times sigma.

The strike price K, i.e. the price an investor has the right (but not the obligation) to buy IBM, is 80. The risk-free interest rate r is 2% and the market spot price S is 90.

You can find the source code of the black_scholes() function here.

This is a part of the course

“Quantitative Risk Management in Python”

View Course

Exercise instructions

  • Compute the volatility of IBM_returns as the annualized standard deviation sigma (you annualized volatility in Chapter 1).
  • Calculate the Black-Scholes European call option price value_s using the black_scholes() function provided, when volatility is sigma.
  • Next find the Black-Scholes option price value_2s when volatility is instead 2 * sigma.
  • Display value_s and value_2s to examine how the option price changes with an increase in volatility.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Compute the volatility as the annualized standard deviation of IBM returns
sigma = np.sqrt(____) * IBM_returns.____

# Compute the Black-Scholes option price for this volatility
value_s = black_scholes(S = 90, X = 80, T = 0.5, r = 0.02, 
                        sigma = ____, option_type = "call")

# Compute the Black-Scholes option price for twice the volatility
value_2s = ____(S = 90, X = 80, T = 0.5, r = 0.02, 
                sigma = ____, option_type = "call")

# Display and compare both values
print("Option value for sigma: ", ____, "\n",
      "Option value for 2 * sigma: ", ____)