newdata augmented with .discount and .yield for the discount
function and the yield curve respectively.
Arguments
x
A ycevo object
newdata
A data frame containing time-to-maturity in years tau and
the quotation date at which the discount functions and the yield curves are to
be predicted. The quotation date is to be named after the quotation
date column in x, which is also the name of the quotation date column of
the data argument in ycevo() that produces x. The default is qdate.
loess
Logical. If TRUE, the returned discount functions and yield curves
are loess smoothed.
...
Additional arguments required for generic consistency. Currently
not used. Warning: A misspelled argument will not raise an error. The
misspelled argument will be either disregarded, or the default value will
be applied if one exists.
Details
If newdata is not provided, returns the discount function and yield curve
at the specified estimation points in ycevo().
If newdata is provided, the discount functions at the time-to-maturities
specified in newdata are generated from loess smoothing (see
stats::loess()), and interpolated to produce the discount function values at the
quotation date specified in newdata, before being converted to the yield curves.
# Simulating bond databonds <- ycevo_data(n = 10)
# \donttest{# Estimation can take up to 30 secondsres <- ycevo(bonds, x = lubridate::ymd("2023-03-01"))
# Augmentationaugment(res)
# }