Description Usage Arguments Details Value Author(s) References See Also Examples
This function computes the weighted average implied volatility corresponding to four weighting schemes ‘“vega”’, ‘“spread”’, ‘“volume”’, and ‘“elasticity”’ discussed in Grover and Thomas (2012).
1 | weighted_iv(prepped)
|
prepped |
A list of objects returned by prep_maturity for a given maturity. |
This function consumes as ‘prepped’ the output of the function ‘prep_maturity’.
Returns a list of the following three elements:
maturity |
Time to expiration in years as passed to weighted_iv via the object returned by prep_maturity. |
schemes |
The weighting scheme(s) as passed to weighted_iv via the object returned by prep_maturity. |
iv |
The weighted average implied volatility corresponding to each weighting schemes. |
Akhil S. Behl akhilsbehl@gmail.com;
Rohini Grover grover.rohini@gmail.com
Grover, R. and Thomas, S. (2012). “Liquidity Considerations in Estimating Implied Volatility”, Journal of Futures Market, 32, 714 - 741.
prep_maturity
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | # Example 1: Weighted average implied volatility for SPX near month options
# using the Vega scheme.
data(vix_spx)
# Preparing data for near month spx options without filtering options with
# zero traded volume.
spx_near <- prep_maturity(maturity=vix_spx$opt_near$maturity[[1]],
riskfree=vix_spx$opt_near$riskfree[[1]],
carry=vix_spx$opt_near$riskfree[[1]],
type=vix_spx$opt_near$type,
strike=vix_spx$opt_near$strike,
underlying=vix_spx$opt_near$underlying,
schemes="vega",
bid=vix_spx$opt_near$bid,
ask=vix_spx$opt_near$ask,
tv_filter=FALSE)
# Weighted average implied volatility
spx_near_iv <- weighted_iv(prepped=spx_near)
spx_near_iv
# Example 2: Weighted average implied volatility for NIFTY near month options
# for the Spread, Elasticity and Vega weighting schemes.
data(vix_nifty)
# Preparing data for near month nifty options and filtering options with
# zero traded volume.
nifty_near <- prep_maturity(maturity=vix_nifty$opt_near$maturity[[1]],
riskfree=vix_nifty$opt_near$riskfree[[1]],
carry=vix_nifty$opt_near$riskfree[[1]],
type=vix_nifty$opt_near$type,
strike=vix_nifty$opt_near$strike,
underlying=vix_nifty$opt_near$underlying,
schemes=c("spread", "elasticity", "vega"),
bid=vix_nifty$opt_near$bid,
ask=vix_nifty$opt_near$ask,
traded_vol=vix_nifty$opt_near$traded_vol,
tv_filter=TRUE)
# Weighted average implied volatility
nifty_near_iv <- weighted_iv(prepped=nifty_near)
nifty_near_iv
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.