Learn R Programming

termstrc (version 1.3.7)

estim_cs.couponbonds: S3 Estim_cs Method

Description

S3 estim.cs method for an object of the class "couponbonds". The method estimates the discount curve with the cubic splines approach by McCulloch (1975).

Usage

"estim_cs"(bonddata, group, matrange = "all", rse = TRUE)

Arguments

bonddata
a data set of bonds in list format.
group
vector defining the group of bonds used for the estimation,

e.g., c("GERMANY","AUSTRIA").

matrange
use "all" for no restrictions, or restrict the maturity range used for the estimation with c(lower,upper).
rse
TRUE (default) calculates robust standard erros for the confidence intervalls of the discount curve

Value

The function returns an object of the class "termstrc_cs". The object contains the following items (mainly lists):
group
group of bonds (e.g. countries) used for the estimation.
matrange
"none" or a vector with the maturity range.
n_group
length of object group, i.e. the number of countries.
knotpoints
selected knot points for the cubic splines estimation.
spot
zero-coupon yield curves as object of the class "spot_curves".
spread
spread curves as object of the class "s_curves".
forward
forward curves as object of the class "fwr_curves".
discount
discount curves as object of the class "df_curves".
cf
cashflow matrices.
m
maturity matrices.
p
dirty prices.
phat
estimated bond prices.
perrors
pricing errors and maturities as object of the class "error".
y
bond yields.
yhat
one list for each group with the theoretical bond yields calculated with the estimated bond prices phat.
yerrors
yield errors and maturities as object of the class "error".
alpha
OLS coefficients of cubic splines estimation.
regout
OLS estimation results as object of the class "lm".
rse
robust standard errors for confidence interval calculation

Details

  • groupThe 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.
  • bonddataThe 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.termstrc_cs, summary.termstrc_cs, plot.termstrc_cs,

estim_nss.couponbonds, plot.spot_curves, plot.s_curves, plot.df_curves,

plot.fwr_curves, plot.error, summary.lm, plot.lm.

Examples

Run this code
# load data set
data(govbonds)

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

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

# perform estimation
x <- estim_cs(govbonds, group, 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