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.
Diese Übung ist Teil des Kurses
Quantitative Risk Management in Python
Anleitung zur Übung
- Compute the volatility of 
IBM_returnsas the annualized standard deviationsigma(you annualized volatility in Chapter 1). - Calculate the Black-Scholes European call option price 
value_susing theblack_scholes()function provided, when volatility issigma. - Next find the Black-Scholes option price 
value_2swhen volatility is instead 2 *sigma. - Display 
value_sandvalue_2sto examine how the option price changes with an increase in volatility. 
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# 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: ", ____)