Skip to content

Black Scholes Merton

George Fisher edited this page Feb 5, 2016 · 29 revisions
library(ustreasuries)
#> 
#> Attaching package: 'ustreasuries'
#> The following object is masked from 'package:stats':
#> 
#>     Gamma
  • EuroCall Calculate the price of a European call option with or without dividends
  • EuroPut Calculate the price of a European put option with or without dividends
# Hull 7th edition Ch 13 P 294
Stock     <- 42    # S_0
Exercise  <- 40    # K
Time      <- 0.50  # T
Interest  <- 0.10  # r
Yield     <- 0     # q
sigma     <- 0.20  

ans_c <- EuroCall(Stock, Exercise, Time, Interest, Yield, sigma)
ans_p <- EuroPut(Stock, Exercise, Time, Interest, Yield, sigma)

writeLines(paste0("c = ", round(ans_c,2), ", p = ", round(ans_p,2)))
#> c = 4.76, p = 0.81
  • EuroCallVol / EuroPutVol Implied Volatility for European Options
# Hull, 7th edition ch 13 p296
Stock      <- 21     # S_0
Exercise   <- 20     # K
Time       <- 0.25   # T
Interest   <- 0.10   # r
Yield      <- 0      # q
Call_price <- 1.875
Put_price  <- 1.875

callvol <- EuroCallVol(Stock, Exercise, Time, Interest, Yield, Call_price)
putvol  <- EuroPutVol(Stock, Exercise, Time, Interest, Yield, Put_price)
writeLines(paste0("Implied Call Volatility: ", round(callvol*100, 1), "% per annum\n",
                  "Implied Put Volatility:  ", round(putvol*100, 1), "% per annum"))

#> Implied Call Volatility: 23.5% per annum
#> Implied Put Volatility:  63.5% per annum


Greeks

Relationship between Delta, Theta and Gamma

  • DeltaCall Amount call-option price changes given a change in asset price
# Hull, 7th edition Ch 17 p 363
Stock    <- 49     # S_0
Exercise <- 50     # K
Time     <- 20/52  # T
Interest <- 0.05   # r
Yield    <- 0      # q
sigma    <- 0.20

ans <- DeltaCall(Stock, Exercise, Time, Interest, Yield, sigma)

writeLines(paste0("Delta call: when the asset price changes by Delta_S,\n",
                  "                the option price changes by Delta_S*",round(ans, 3)))
#> Delta call: when the asset price changes by Delta_S,
#>                 the option price changes by Delta_S*0.522
  • DeltaPut Amount put-option price changes given a change in asset price
# Hull, 7th edition Ch 17 p 362,3
Stock    <- 49     # S_0
Exercise <- 50     # K
Time     <- 20/52  # T
Interest <- 0.05   # r
Yield    <- 0      # q
sigma    <- 0.20

dcall <- DeltaCall(Stock, Exercise, Time, Interest, Yield, sigma)
dput  <- DeltaPut(Stock, Exercise, Time, Interest, Yield, sigma)

writeLines(paste0("Delta put: when the asset price changes by Delta_S,\n",
               "               the option price changes by Delta_S*",round(dput, 3),
               "\nDelta put = Delta call - 1? ", dput == dcall-1))
#> Delta put: when the asset price changes by Delta_S,
#>                the option price changes by Delta_S*-0.478
#> Delta put = Delta call - 1? TRUE

Delta plot

  • ThetaCall the decay in the value of a call or a portfolio of calls as time passes
  • ThetaPut the decay in the value of a put or a portfolio of puts as time passes
# Hull, 7th edition Ch 17 p 367
Stock    <- 49     # S_0
Exercise <- 50     # K
Time     <- 20/52  # T
Interest <- 0.05   # r
Yield    <- 0      # q
sigma    <- 0.20

thcall <- ThetaCall(Stock, Exercise, Time, Interest, Yield, sigma)
thput  <- ThetaPut(Stock, Exercise, Time, Interest, Yield, sigma)

rKe    <- Interest * Exercise * exp(-Interest*Time)
#---------------------------------------------------

writeLines(paste0("ThetaCall:        ", round(thcall, 2),                "\n",
                  "ThetaPut:         ", round(thput, 2),                 "\n",
                  "per calendar day: ", round(thcall/365, 4), " (call)", "\n",
                  "per trading day:  ", round(thcall/252, 4), " (call)", "\n\n",
    "ThetaPut is always greater than ThetaCall by an amount rKe:",       "\n",
    "Diff: ",thput-thcall,"\n",
    "rKe:  ",rKe))
#> ThetaCall:        -4.31
#> ThetaPut:         -1.85
#> per calendar day: -0.0118 (call)
#> per trading day:  -0.0171 (call)
#> 
#> ThetaPut is always greater than ThetaCall by an amount rKe:
#> Diff: 2.45238240590051
#> rKe:  2.45238240590051

Theta plot

  • Gamma the change in Delta with respect to asset price
# Hull, 7th edition Ch 17 p 371,2
Stock    <- 49     # S_0
Exercise <- 50     # K
Time     <- 20/52  # T
Interest <- 0.05   # r
Yield    <- 0      # q
sigma    <- 0.20

gamma <- Gamma(Stock, Exercise, Time, Interest, Yield, sigma)
round(gamma, 3) # 0.066
#> [1] 0.066

Gamma plot



  • Vega the sensitivity to changes in the volatility of the underlying
# Hull, 7th edition Ch 17 p 375
Stock    <- 49     # S_0
Exercise <- 50     # K
Time     <- 20/52  # T
Interest <- 0.05   # r
Yield    <- 0      # q
sigma    <- 0.20

vega <- Vega(Stock, Exercise, Time, Interest, Yield, sigma)

writeLines(paste0("The value of Vega is ", round(vega,1),   "\n",
"Therefore, a 1% change in the volatility from 20% to 21%", "\n",
"will raise the price of the option by this amount:",       "\n",
"1% x ", round(vega,1), " = ", round((0.01 * vega), 3),
", from ", Stock, " to ", Stock+round((0.01 * vega), 3)))
#> The value of Vega is 12.1
#> Therefore, a 1% change in the volatility from 20% to 21%
#> will raise the price of the option by this amount:
#> 1% x 12.1 = 0.121, from 49 to 49.121

  • RhoCall the sensitivity to changes in the risk-free rate of return
  • RhoPut the sensitivity to changes in the risk-free rate of return
# Hull, 7th edition Ch 17 p 376
Stock    <- 49     # S_0
Exercise <- 50     # K
Time     <- 20/52  # T
Interest <- 0.05   # r
Yield    <- 0      # q
sigma    <- 0.20

rhocall <- RhoCall(Stock, Exercise, Time, Interest, Yield, sigma)
rhoput  <- RhoPut(Stock, Exercise, Time, Interest, Yield, sigma)

writeLines(paste0("RhoCall:  ", round(rhocall, 2), "\n",
                  "RhoPut:  ", round(rhoput, 2)))
#> RhoCall:  8.91
#> RhoPut:  -9.96