analytic_gbm: Black-Scholes European option pricing and greeks

Description Usage Arguments Value Examples

View source: R/analytic_black_scholes.R

Description

Function calls price and greeks analytic pricing functions and returns all simultaneously in a data.frame

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
analytic_gbm(
  spot,
  strike,
  maturity,
  rate,
  div,
  volat,
  what,
  current_time = 0,
  output = "greeks"
)

Arguments

spot

the underlying share price

strike

strike price of the option

maturity

the maturity of the option contract

rate

the risk-neutral rate

div

the dividend yield

volat

the volatility i.e. annualized standard deviation of log-returns

what

type of option, put or call

current_time

the current time, usually 0

output

either "greeks" or "price

Value

data.frame

Examples

1
2
3
4
5
6
7
8
spot <- 100
maturity <- 1
strike <- 100
rate <- 0.05
div <- 0
volat <- 0.19
what <- "call"
print(analytic_gbm(spot, strike, maturity, rate, div, volat, what))

shill1729/OptionPricer documentation built on June 11, 2020, 12:18 a.m.