Learn R Programming

termstrc (version 1.1.1)

splines_estim: Discount Curve Estimation with McCulloch Cubic Splines

Description

Discount curve estimation with the cubic splines approach by McCulloch (1975).

Usage

splines_estim(group,
              bonddata,
              matrange = "all")

Arguments

group
vector defining the group of bonds used for the estimation, e.g. c("GERMANY","AUSTRIA").
bonddata
a data set of bonds in list format.
matrange
use "all" for no restrictions, or restrict the maturity range used for the estimation with c(lower,upper).

Value

  • The function splines_estim returns an object of the class "cubicsplines". The object contains the following items (mainly lists):
  • groupgroup of bonds (e.g. countries) used for the estimation.
  • matrange"none" or a vector with the maturity range.
  • n_grouplength of object group, i.e. the number of countries.
  • knotpointsselected knot points for the cubic splines estimation.
  • spotzero-coupon yield curves as object of the class "spot_curves".
  • spreadspread curves as object of the class "s_curves".
  • forwardforward curves as object of the class "fwr_curves".
  • discountdiscount curves as object of the class "df_curves".
  • cfcashflow matrices.
  • mmaturity matrices.
  • pdirty prices.
  • phatestimated bond prices.
  • perrorspricing errors and maturities as object of the class "error".
  • ybond yields.
  • yhatone list for each group with the theoretical bond yields calculated with the estimated bond prices phat.
  • yerrorsyield errors and maturities as object of the class "error".
  • alphaOLS coefficients of cubic splines estimation.
  • regoutOLS estimation results as object of the class "lm".

Details

  • group
{The first element of the vector will be used as the reference country for the spread curve calculation. group can be either a vector of bond groups or a scalar.} bonddata{The package is designed to work with a certain list data structure. For more information use the function str() to explore the structure of the example data sets.}

References

J.Huston McCulloch (1971): Measuring the Term Structure of Interest Rates. The Journal of Business, 44 19--31. J. Huston McCulloch (1975): The Tax-Adjusted Yield Curve. The Journal of Finance, 30 811--830.

See Also

print.cubicsplines, summary.cubicsplines, plot.cubicsplines, nelson_estim, plot.spot_curves, plot.s_curves, plot.df_curves, plot.fwr_curves, plot.error, summary.lm, print.lm, plot.lm.

Examples

Run this code
# load data set
data(eurobonds)

# define countries, for which the estimation 
# of the zero-coupon yield curves will be carried out
group <- c("GERMANY", "AUSTRIA", "ITALY")

# define data set
bonddata <- eurobonds

# set maturtiy range
matrange <- c(0, 19)  

# perform estimation
x <- splines_estim(group, bonddata, matrange)

# print the obtained parameters of the estimation
print(x)

# goodness of fit measures
summary(x)

# plot the zero-coupon yield curve for each country
plot(x,errors="none")

# plot all zero-coupon yield curves together
plot(x,multiple=TRUE,errors="none")

# spread curve splot
plot(x,ctype="spread",errors="none")

# price error plot for all countries
plot(x,ctype="none")

Run the code above in your browser using DataLab