augment.ycevo | R Documentation |
Augment data with predicted discount function and yield curve
## S3 method for class 'ycevo'
augment(x, newdata = NULL, loess = TRUE, ...)
x |
A ycevo object |
newdata |
A data frame containing time-to-maturity in years |
loess |
Logical. Whether the returned discount function and yield curve 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. |
If newdata
is not provided, returns the discount function and yield curve
values at points specified for the estimation in ycevo()
.
If newdata
is provided, the discount function at the time-to-maturities
specified in newdata
will be generated from loess smoothing (see
stats::loess()
), then interpolated to produce the discount function at the
quotation date specified in newdata
.
newdata
augmented with .discount
and .yield
for the discount
function and the yield curve respectively.
ycevo()
# Simulating bond data
bonds <- ycevo_data(n = 10)
# Estimation can take up to 30 seconds
res <- ycevo(bonds, x = lubridate::ymd("2023-03-01"))
# Augmentation
augment(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.