interpolate.VolSurface: Interpolate a 'VolSurface' object.

Description Usage Arguments Value See Also Examples

View source: R/interpolation-class.R

Description

This method is used to interpolate a VolSurface object at multiple points of the plane. The interpolation depends on the type of the surface, if the vols are given by strikes, delta, moneyness.

Usage

1
2
## S3 method for class 'VolSurface'
interpolate(x, at, ...)

Arguments

x

object of class VolSurface to be interpolated.

at

indicates the coordinates at which the interpolation is performed. at should be given as a tibble::tibble() with two column names named maturity and smile. e.g. list(maturity = c(1, 2), smile = c(72, 92)).

...

unused in this model.

Value

numeric vector with length equal to the number of rows of at.

See Also

Other interpolate functions: interpolate.CreditCurve, interpolate.ZeroCurve, interpolate_dfs.CreditCurve, interpolate_zeros.CreditCurve, interpolate

Examples

1
2
3
4
5
6
x <- build_vol_surface()
at <- tibble::tibble(
  maturity = c(as.Date("2020-03-31"), as.Date("2021-03-31")),
  smile = c(40, 80)
)
interpolate(x, at)

imanuelcostigan/fmbasics documentation built on Dec. 6, 2019, 9:48 a.m.