Learn R Programming

termstrc (version 1.0)

nelson_estim: Term Structure and Credit Spread Estimation with Nelson/Siegel and Svensson Method

Description

Term structure and credit spread estimation with Nelson/Siegel and Svensson method

Usage

nelson_estim(group,
             bonddata,
             matrange = "all",
             method = "Nelson/Siegel",
             fit = "prices",
             weights = "none",
             startparam, control = list(eval.max = 1000))

Arguments

group
vector defining the group of bonds used for the estimation,\newlinee.g. c("GERMANY","AUSTRIA")
bonddata
a dataset of bonds in list format
matrange
use "all" for no restrictions, or restrict the maturity range used for the estimation with c(lower,upper)
method
"Nelson/Siegel" or "Svensson"
fit
use "prices" ("yields") for minimising the squared price (yield) error
weights
If a weighted minimisation of the squared price deviation is required, use "duration", otherwise "none"
startparam
matrix of start parameters, for the Nelson/Siegel (Svensson) method 4 (6) parameters for each each group are required (one row per group).
control
list of control parameters for the function nlminb

Value

  • The function nelson_estim returns a list with the following elements or sub-lists:
  • groupgroups used from data set
  • matrangeincludes the chosen maturity range
  • methodincludes the chosen estimation method
  • fitincludes the chosen objective function
  • weightstype of weighting used in optimisation
  • n_groupthe number of groups used for the optimisation
  • zcy_curvesvalues for plotting the estimated zero-coupon yield curves
  • scurvesvalues for plotting the spread curves
  • cfcashflows matrix for all specified groups
  • mmaturity matrix for all specified groups
  • durationduration, weighted duration and duration based weights
  • pdirty prices
  • phatestimated bond prices
  • ybond yields
  • yhattheoretical bond yields calculated with the estimated bond prices phat
  • opt_resultthe optimal parameter vector for the specified groups according to the chosen estimation approach

Details

group{The first element of the vector will be used as the reference country for the credit spread estimation. The group can be either a vector of groups or a scalar.} bonddata{The package is tailored to the included data sets. Therefore the structure and the naming convention of other used data sets has to be identical. Use the function str() to explore the structure of the provided datasets.} startparam{For the estimation a matrix of start parameters must be provided. The estimation is very sensitive to the start parameters, due to multiple local minima of the objective functions. Therefore a great effort should be invested in finding a good start parameter set. } control{Please refer to the documentation of the function mlimnb.}

References

Charles R. Nelson and Andrew F. Siegel (1987): Parsimonious modeling of yield curves. The Journal of Business, 60(4):473--489. Lars E.O. Svensson (1994): Estimating and interpreting forward interest rates: Sweden 1992 -1994. Technical Reports 4871, National Bureau of Economic Research. David Bolder and David Streliski (1999): Yield Curve Modelling at the Bank of Canada. Technical Report No 84 Bank of Canada

See Also

for another estimation method see splines_estim

Examples

Run this code
demo(euro01)

Run the code above in your browser using DataLab