estim_cs.couponbonds: S3 Estim_cs Method

Description Usage Arguments Details Value Note References See Also Examples

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

1
2
## S3 method for class 'couponbonds'
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

Details

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

Note

For objects of the class "spot_curves", "s_curves", "df_curves", "fwr_curves", "error" appropriate plot methods are offered. For objects of the list item regout standard lm methods apply. For objects of the class "termstrc_cs" print, summary and plot methods are available. Another term structure estimation method is provided by the method

estim_nss.couponbonds.

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

 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
30
# 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")

changshun/termstrc documentation built on May 13, 2019, 3:24 p.m.