search for: create_maturities_matrix

Displaying 2 results from an estimated 2 matches for "create_maturities_matrix".

2009 Mar 20
1
How to use termstrc functions?
Hi, I'm trying to use the package termstrc. However I cannot figure out how to invoke helper functions like create_cashflows_matrix & create_maturities_matrix. Even when I try to invoke those with the data supplied with the package (say, corpbonds), it throws error saying "Error in as.vector(x, mode) : invalid 'mode' argument". Can anybody provide some working example for these? I'm on Windows XP and using R-2.7.2 + termstrc 1.1. T...
2009 Apr 09
0
Invoking bond_prices function of termstrc package
...nction bond_prices from termstrc package. Here is the code snippet: library(termstrc) data(eurobonds) b <- matrix(rep(c(0,0,0, 1),1),nrow=1,byrow=TRUE) group<-c("GERMANY") colnames(b) <- c("beta0","beta1","beta2","tau1") germaturities<-create_maturities_matrix(eurobonds$GERMANY) bp<-bond_prices(method = "Nelson/Siegel",b,germaturities,eurobonds$GERMANY$CASHFLOWS$CF) bp Running this, I get the following warning message: In cf * discount_factors : longer object length is not a multiple of shorter object length Also the values I get (bp) se...