GenBS: Generalized Black Scholes model for pricing vanilla European...

Description Usage Arguments Details Value

View source: R/GenBS.R

Description

Compute values of call and put options as well as the Greeks - the sensitivities of the option price to various input arguments using the Generalized Black Scholes model. "Generalized" means that the asset can have a continuous dividend yield.

Usage

1
GenBS(s, X, r, Sigma, t, div_yield = 0)

Arguments

s

the spot price of the asset (the stock price for options on stocks)

X

the exercise or strike price of the option

r

the continuously compounded rate of interest in decimal (0.10 or 10e-2 for 10%) (use equiv.rate to convert to a continuously compounded rate)

Sigma

the volatility of the asset price in decimal (0.20 or 20e-2 for 20%)

t

the maturity of the option in years

div_yield

the continuously compounded dividend yield (0.05 or 5e-2 for 5%) (use equiv.rate to convert to a continuously compounded rate)

Details

The Generalized Black Scholes formula for call options is
exp(-r * t) * (s * exp(g * t) * Nd1 - X * Nd2)
where
g = r - div\_yield
Nd1 = N(d1) and Nd2 = N(d2)
d1 = (log(s / X) + (g + Sigma^2/ 2) * t) / (Sigma * sqrt(t))
d2 = d1 - Sigma * sqrt(t)
N denotes the normal CDF (pnorm)
For put options, the formula is
exp(-r * t) * (-s * exp(g * t) * Nminusd1 + X * Nminusd2)
where
Nminusd1 = N(-d1) and Nminusd2 = N(-d2)

Value

A list of the following elements

call

the value of a call option

put

the value of a put option

Greeks

a list of the following elements

Greeks$callDelta

the delta of a call option - the sensitivity to the spot price of the asset

Greeks$putDelta

the delta of a put option - the sensitivity to the spot price of the asset

Greeks$callTheta

the theta of a call option - the time decay of the option value with passage of time. Note that time is measured in years. To find a daily theta divided by 365.

Greeks$putTheta

the theta of a put option

Greeks$Gamma

the gamma of a call or put option - the second derivative with respect to the spot price or the sensitivity of delta to the spot price

Greeks$Vega

the vega of a call or put option - the sensitivity to the volatility

Greeks$callRho

the rho of a call option - the sensitivity to the interest rate

Greeks$putRho

the rho of a put option - the sensitivity to the interest rate

extra

a list of the following elements

extra$d1

the d1 of the Generalized Black Scholes formula

extra$d2

the d2 of the Generalized Black Scholes formula

extra$Nd1

is pnorm(d1)

extra$Nd2

is pnorm(d2)

extra$Nminusd1

is pnorm(-d1)

extra$Nminusd2

is pnorm(-d2)

extra$callProb

the (risk neutral) probability that the call will be exercised = Nd2

extra$putProb

the (risk neutral) probability that the put will be exercised = Nminusd2


jrvFinance documentation built on Nov. 5, 2021, 5:07 p.m.