NS: Zero Rates for Nelson-Siegel-Svensson Model

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Compute zero yields for Nelson–Siegel (NS)/Nelson–Siegel–Svensson (NSS) model.

Usage

1
2
NS(param, tm)
NSS(param, tm)

Arguments

param

a vector. For NS: beta1, beta2, beta3, lambda. For NSS: a vector: beta1, beta2, beta3, beta4, lambda1, lambda2.

tm

a vector of maturities

Details

See Chapter 14 in Gilli/Maringer/Schumann (2011).

Maturities (tm) need to be given in time (not dates).

Value

The function returns a vector of length length(tm).

Author(s)

Enrico Schumann

References

Gilli, M. and Grosse, S. and Schumann, E. (2010) Calibrating the Nelson-Siegel-Svensson model, COMISEF Working Paper Series No. 031. http://comisef.eu/files/wps031.pdf

Gilli, M., Maringer, D. and Schumann, E. (2011) Numerical Methods and Optimization in Finance. Elsevier. http://www.elsevierdirect.com/product.jsp?isbn=9780123756626

Gilli, M. and Schumann, E. (2010) A Note on ‘Good’ Starting Values in Numerical Optimisation, COMISEF Working Paper Series No. 044. http://comisef.eu/files/wps044.pdf

Nelson, C.R. and Siegel, A.F. (1987) Parsimonious Modeling of Yield Curves. Journal of Business, 60(4), pp. 473–489.

Svensson, L.E. (1994) Estimating and Interpreting Forward Interest Rates: Sweden 1992–1994. IMF Working Paper 94/114.

See Also

NSf, NSSf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
tm <- c(c(1, 3, 6, 9) / 12, 1:10)  ## in years
param <- c(6, 3, 8, 1)
yM <- NS(param, tm)
plot(tm, yM, xlab = "maturity in years", 
             ylab = "yield in percent")

param <- c(6, 3, 5, -5, 1, 3)  
yM <- NSS(param, tm) 
plot(tm, yM, xlab = "maturity in years", 
             ylab = "yield in percent")


## Not run: 
## get Bliss/Diebold/Li data (used in some of the papers in References)
u <- url("http://www.ssc.upenn.edu/~fdiebold/papers/paper49/FBFITTED.txt")
open(u); BliDiLi <- scan(u, skip = 14); close(u)
mat <- NULL
for (i in 1:372) 
    mat <- rbind(mat,BliDiLi[(19*(i-1)+1):(19*(i-1)+19)])
mats  <- c(1,3,6,9,12,15,18,21,24,30,36,48,60,72,84,96,108,120)/12

## the obligatory perspective plot
persp(x = mat[,1], y = mats, mat[ ,-1L],
      phi = 30, theta = 30, ticktype = "detailed",
      xlab = "time",
      ylab = "time to maturity in years",
      zlab = "zero rates in %")

## End(Not run)

NMOF documentation built on May 2, 2019, 6:39 p.m.