aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/load_cf.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/load_cf.R b/R/load_cf.R
index f58a6016..c68a8abf 100644
--- a/R/load_cf.R
+++ b/R/load_cf.R
@@ -271,8 +271,8 @@ compute.delta <- function(indexdist, dealweight, cusip.pv, workdate=Sys.Date()){
for(i in 1:length(dealweight)){
indexpv <- c(indexpv, funded.tranche.pv(scenariosl[i,], scenariosr[i,], cs, 0, 1))
}
- model <- lm(cusip.pv~0+indexpv, weights=dealweight)
- return(model$coef)
+ model <- lm(cusip.pv~indexpv, weights=dealweight)
+ return(model$coef[2])
}
cfdata <- getdealcf(dealnames, workdate)