VolQuotes
class is designed to capture volatility data. Checks that the
inputs are of the correct type and stores the values in a tibble::tibble()
.
VolQuotes(maturity, smile, value, reference_date, type, ticker)
maturity | Date vector that captures the maturity pillar points. |
---|---|
smile | numeric vector containing the values of the second dimension
of the volatility surface. The elements of the vector can either contain
the strikes, the moneyness or the delta. The input type is specified in
|
value | numeric vector containing the values of the volatilities. Should
typically be represented as a decimal value (e.g. 30% should be 0.3) and
must be the same length as |
reference_date |
|
type | string defining the second dimension of the VolSurface. The
values accepted in |
ticker | string that represents the underlying asset. This is stored as
an attribute to the tibble and can be extracted by calling
|
object of class VolQuotes
pillars <- seq(as.Date("2019-04-26") + 1, by = "month", length.out = 3) VolQuotes( maturity = rep(pillars, 4), smile = rep(seq(10, 20, length.out = 4), each = 3), value = seq(1, 0.1, length.out = 12), reference_date = as.Date("2019-04-26"), type = "strike", ticker = "ABC.AX" )#> # A tibble: 12 x 3 #> maturity smile value #> <date> <dbl> <dbl> #> 1 2019-04-27 10 1 #> 2 2019-05-27 10 0.918 #> 3 2019-06-27 10 0.836 #> 4 2019-04-27 13.3 0.755 #> 5 2019-05-27 13.3 0.673 #> 6 2019-06-27 13.3 0.591 #> 7 2019-04-27 16.7 0.509 #> 8 2019-05-27 16.7 0.427 #> 9 2019-06-27 16.7 0.345 #> 10 2019-04-27 20 0.264 #> 11 2019-05-27 20 0.182 #> 12 2019-06-27 20 0.1