[R-SIG-Finance] termstrc: bond yields

sprohl at na.uni-tuebingen.de sprohl at na.uni-tuebingen.de
Mon Sep 28 08:32:17 CEST 2009


Hello,
by using termstrc package to compute bond yields using example considered
in "Zero-coupon yield curve estimation with the Package termstrc", I run
into following problems:

data(corpbonds)

group <- c("AAA", "AA+", "AA")

cashflows<-create_cashflows_matrix(group, include_price = FALSE)
Fehler in as.vector(x, mode) : ungültiges Argument 'mode'
Zusätzlich: Warning message:
$ operator is deprecated for atomic vectors, returning NULL in:
group$CASHFLOWS

cashflows<-create_maturities_matrix(group, include_price = FALSE)
Fehler in as.vector(x, mode) : ungültiges Argument 'mode'
Zusätzlich: Warning message:
$ operator is deprecated for atomic vectors, returning NULL in:
group$CASHFLOWS

# compute bond yields
bond_yields(cashflows, m, searchint = c(-1, 1), tol = 1e-10)
Fehler in bond_yields(cashflows, m, searchint = c(-1, 1), tol = 1e-10) :
        unbenutzte(s) Argument(e) (searchint = c(-1, 1))

Does anybody know how to solve this problem?
Best regards,
Sven



More information about the R-SIG-Finance mailing list