Description Usage Arguments Value Examples
View source: R/analytic_black_scholes.R
Function calls price and greeks analytic pricing functions and returns all simultaneously in a data.frame
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"
)
|
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 |
data.frame
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.