plot.termstrc_cs: S3 Plot Method for Cubic Splines

Description Usage Arguments Details See Also

Description

S3 plot method for an object of the class "termstrc_cs".

Usage

1
2
3
4
5
6
## S3 method for class 'termstrc_cs'
plot(x, matrange = c(min(mapply(function(i) min(x$y[[i]][, 1]), 
	seq(x$n_group))), max(mapply(function(i) max(x$y[[i]][, 1]), 
	seq(x$n_group)))), multiple = FALSE, 
	ctype = "spot", lwd=2, lty=1, type = "l", 
	errors = "none", inset = c(0.1, 0.3), ask=TRUE, ...)

Arguments

x

object of the class "termstrc_cs".

matrange

maturity range for the plot, e.g. c(2,10).

multiple

if TRUE all curves are plotted together (default: FALSE).

ctype

parameter setting for the desired curve type, "spot" ("forward", "discount", "spread") for the spot rate (forward rate, discount factor, spread) curves. Use "none" if no curve plot is desired.

errors

Specify the type of the error plot. If "price" ("yield") the price (yield) errors will be plot. Use "none" if no error plot is desired.

lwd

the line width, for details see par.

lty

the line type, for details see par.

type

1-character string giving the type of plot desired, for details see plot.default.

inset

inset distance(s) from the margins as a fraction of the plot region, for details see legend.

ask

if TRUE (and the R session is interactive) the user is asked for input, before a new figure is drawn, see par for details.

...

other graphical parameters, see par.

Details

Depending on the choice of the curve type ("spot", "forward", "discount", "spread") the corresponding curves will be plotted. Either separately or together (mulitple = TRUE). If the curves are plotted separately also the knot points used for the estimation of the cubic splines and the yield-to-maturities will be plotted. In addition, with a zero-coupon yield curve plot the 95 % confidence interval of the curve will be plotted. To ease the analysis of the goodness of the estimation, serveral error plots for the yield and price error are offered.

See Also

plot.df_curves, plot.error, plot.fwr_curves, plot.ir_curve, plot.s_curves, plot.spot_curves, plot.termstrc_cs


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