aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/mlpdb.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/mlpdb.R b/R/mlpdb.R
index 11c146a5..d45fd9df 100644
--- a/R/mlpdb.R
+++ b/R/mlpdb.R
@@ -15,7 +15,7 @@ load.index <- function(name, date=Sys.Date(), tenor="5yr", Z, w, N){
r <- as.list(dbGetQuery(mlpdbCon, sprintf(sqlstr, id, tenor)))
if(any(c(missing(Z), missing(w), missing(N)))){
return( list(tenor=tenor, factor=r$indexfactor/100, maturity=r$maturity,
- loss=r$cumulativeloss/100, recovery=0.4))
+ loss=r$cumulativeloss/100, recovery=0.4, name=name))
}else{
return( list(tenor=tenor, factor=r$indexfactor/100, maturity=r$maturity,
loss=r$cumulativeloss/100, recovery=0.4, name=name, Z=Z, w=w, N=N))