Description Usage Arguments Value Examples
Compute the undiscounted delta of an option.
1 | compDelta(option_type, future, strike, vol, time_to_exp)
|
option_type |
type of the option, either a call or a put. Use 'c' for a call and 'p' for a put. |
future |
price of the future contract. |
strike |
strike of the option. |
vol |
implied volatility. |
time_to_expiry |
remaining life of the option, in fraction of a year. |
The undiscounted delta of a option_type
of strike strike
and option life of time_to_expiry
.
1 2 3 4 5 6 7 | df <- data.frame(strike = c(50, 20), # the option strike - in $
type = c("C", "P"), # either <e2><80><9c>c<e2><80><9d> for call option or <e2><80><9c>p<e2><80><9d> for a put option
futurePrice = c(48.03, 48.03), # the price of the underlying future - in $
vol = c(0.08, 0.30) # the implied volatility of the underlying future
time_to_expiry = c(0.1423, 0.1423))
compDelta(df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.