Skip to content

Commit

Permalink
Confirm to new_tibble() interface
Browse files Browse the repository at this point in the history
  • Loading branch information
imanuelcostigan committed Sep 7, 2019
1 parent 3e94e46 commit 5971cdc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/vol-surface-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ print.VolSurface <- function(x, ...) {
#' @param 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
#' `type` parameter.
#' `type` parameter. Must be the same length as `maturity`
#' @param value numeric vector containing the values of the volatilities. Should
#' typically be represented as a decimal value (e.g. 30\% should be 0.3).
#' typically be represented as a decimal value (e.g. 30\% should be 0.3) and
#' must be the same length as `maturity`
#' @param reference_date `Date` that captures the as of date. This is stored as
#' an attribute to the tibble and can be extracted by calling
#' `attr(x, "reference_date")`
Expand Down Expand Up @@ -145,6 +146,7 @@ new_VolQuotes <- function(maturity, smile, value, reference_date, type, ticker,
smile = smile,
value = value
),
nrow = length(maturity),
reference_date = reference_date,
type = type,
ticker = ticker,
Expand Down

0 comments on commit 5971cdc

Please sign in to comment.