Description Usage Arguments Details Value Examples
Calculates the curve extension until time 100 using swap (Cubic Spline and N-S)
1 | curve_extensionNS(termStruct.out, parameters = NS_params)
|
termStruct.out |
Contains the linearly interpolated risk free rates from cubic_spline() |
params |
parameters for the Neilson and Siegel extrapolation method |
N-S refers to the Nelson & Siegel Extrapolation for Spot Rates. The formula is: rtm <- BO + B1(1 - exp(-m/tau1))/(m/tau1) + B2((1-exp(-m/tau2))/(m/tau2) - exp(-m/tau2)), where rtm is the spot rate in term m.
The implied forward rate could be calculated by placing the following code into the function:
impliedFR <- numeric(100)
for(i in 0:99) impliedFR[i+1] = longZcb[i+1]/longZcb[i+2] - 1
impliedFR <- c(1/longZcb[1]-1, head(impliedFR,-1))
The curve extension for an additional 70 years (continuous zero rate)
1 2 | termStruct.out <- cubic_spline(termStruct)
termStruct.extension <- curve_extensionNS(termStruct.out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.