NSf: Factor Loadings for Nelson-Siegel and Nelson-Siegel-Svensson

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

View source: R/NSf.R

Description

Computes the factor loadings for Nelson–Siegel (NS) and Nelson–Siegel–Svensson (NSS) model for given lambda values.

Usage

1
2
NSf(lambda, tm)
NSSf(lambda1, lambda2, tm)

Arguments

lambda

the lambda parameter of the NS model (a scalar)

lambda1

the lambda1 parameter of the NSS model (a scalar)

lambda2

the lambda2 parameter of the NSS model (a scalar)

tm

a numeric vector with times-to-payment/maturity

Details

The function computes the factor loadings for given lambda parameters. Checking the correlation between these factor loadings can help to set reasonable lambda values for the NS/NSS models.

Value

For NS, a matrix with length(tm) rows and three columns. For NSS, a matrix with length(tm) rows and four columns.

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.

Schumann, E. (2016) Financial Optimisation with R (NMOF Manual). http://enricoschumann.net/NMOF.htm#NMOFmanual

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

See Also

NS, NSS

Examples

1
2
3
4
5
6
## Nelson-Siegel
cor(NSf(lambda = 6, tm = 1:10)[-1L, -1L])

## Nelson-Siegel-Svensson
cor(NSSf(lambda1 = 1, lambda2 = 5, tm = 1:10)[-1L, -1L])
cor(NSSf(lambda1 = 4, lambda2 = 9, tm = 1:10)[-1L, -1L])

enricoschumann/NMOF documentation built on Feb. 14, 2019, 2:21 p.m.