spotratecurve-helpers {fixedincome} | R Documentation |
SpotRateCurve helpers
Description
Helpers methods that return parts of a SpotRateCurve object according to a given term.
Usage
first(x, t)
last(x, t)
closest(x, t)
Arguments
x |
a SpotRateCurve object. |
t |
a Term object.
|
Value
A SpotRateCurve
object that is a subset of the given curve.
The elements returned are select according to the operation executed.
Examples
terms <- c(1, 11, 26, 27, 28)
rates <- c(0.0719, 0.056, 0.0674, 0.0687, 0.07)
curve <- spotratecurve(rates, terms, "discrete", "actual/365", "actual")
first(curve, "10 days")
last(curve, "10 days")
closest(curve, "10 days")
[Package fixedincome version 0.0.5 Index]