compDelta: Compute the undiscounted delta of an option.

Description Usage Arguments Value Examples

View source: R/plotivol.R

Description

Compute the undiscounted delta of an option.

Usage

1
compDelta(option_type, future, strike, vol, time_to_exp)

Arguments

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.

Value

The undiscounted delta of a option_type of strike strike and option life of time_to_expiry.

Examples

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)

hbianco/plotivol documentation built on May 18, 2019, 3:42 p.m.