
Hi,

I have the following bond data set.


> USAbonds <- list(USA)
> names(USAbonds) <- c("USA")
> class(USAbonds) = "couponbonds"
> str(USAbonds)

List of 1
 $ USA:List of 8
  ..$ ISIN        : chr [1:10] "US912795X480" "US9127952C46"
"US9127952S97" "US9127952P58" ...
  ..$ MATURITYDATE:Class 'Date'  num [1:10] 18619 18316 18408 18583
18596 ...
  ..$ STARTDATE   :Class 'Date'  num [1:10] 18437 18500 18592 18584
18596 ...
  ..$ COUPONRATE  : num [1:10] 0 0 0 0 0.5 ...
  ..$ PRICE       : num [1:10] 0.153 0.143 0.195 0.248 100.062 ...
  ..$ ACCRUED     : num [1:10] 0 0 0 0 0 ...
  ..$ CASHFLOWS   :List of 3
  .. ..$ ISIN: chr [1:118] "US912795X480" "US9127952C46" "US9127952S97"
"US9127952P58" ...
  .. ..$ CF  : num [1:118] 100 100 100 100 0.25 ...
  .. ..$ DATE:Class 'Date'  num [1:118] 18619 18316 18408 18583 18413
...
  ..$ TODAY       :Class 'Date'  num 18590
 - attr(*, "class")= chr "couponbonds"

When I run the "estim_nss" function, I get the following error..  Any
ideas/suggestions as of what might be wrong? I suspect that I am missing
something in the data set creation..

>  ns_res <- estim_nss(USAbonds, c("USA"),matrange = c(0, 30), method =
"ns", tauconstr = list(c(0.2, 5, 0.1)))
Error in uniroot(pvcashflows, searchint, tol = tol, maxiter = 3000) : 
  f() values at end points not of opposite sign
> 


Jorge Nieves



	[[alternative HTML version deleted]]

