This function takes a data.frame of option data and at each date builds the spline IV surface, based on that estimates prices of divergence, skewness and quarticity swaps
1 2 3 | impliedDivergencesWrapper(options, pow.vec, t.vec, types, filtering.expression,
cl = cl, U = NULL, L = NULL, gam.bs = "ds", gam.m = c(1, 0.5),
bootstrap = F, Nrepl = 1000)
|
options |
data.frame with fields date, k (log(relative strike with respect to underlying)), relMid (relative mid-price with respect to underlying), r (interest rate), q (implied dividend yield), k_stand (k divided by atmIV and sqrt(expiration)) |
pow.vec |
vector of divergence powers |
t.vec |
vector of maturities |
types |
vector of characters, length up to 3, can contain "div", "skew" and "quart" |
filtering.expression |
quoted expression to be passed to |
cl |
cluster for parallel calculations |
U |
upper integration limit for pricing in terms of log-strike. U > 0 |
L |
lower integration limit for pricing in terms of log-strike. L < 0 |
gam.bs |
bs argument to |
gam.m |
m argument to |
bootstrap |
boolean argument to |
Nrepl |
integer argument to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.