diff options
Diffstat (limited to 'R/load_cf.R')
| -rw-r--r-- | R/load_cf.R | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/R/load_cf.R b/R/load_cf.R index 14a4a3c5..27a8abce 100644 --- a/R/load_cf.R +++ b/R/load_cf.R @@ -146,7 +146,7 @@ getdealcf <- function(dealnames, zipfiles, tradedate=Sys.Date()){ program <- tryCatch(KLfit(t(cf)/1e8, rep(1/n.scenarios, n.scenarios),
dealdata$mv/1e8), error=function(e) e)
if(inherits(program, "error")){
- cat("error computing the delta for deal:", dealname,"\n")
+ cat("error computing the weights for deal:", dealname,"\n")
cfdata[[dealname]] <- NULL
next
}else{
@@ -171,7 +171,7 @@ getcusipcf <- function(params, cfdata, dist, tradedate=Sys.Date()){ zip <- params$zipfiles[params$cusips[[cusip]]]
dealname <- dealnames[i]
dealdata <- getdealdata(dealname, tradedate)
- alldates <- getdealschedule(dealdata,"1 month", startdate=tradedate, adjust=TRUE)
+ alldates <- getdealschedule(dealdata,"1 month", adjust=TRUE)
T <- ifelse(alldates>=L3m$params$tradeDate, yearFrac(L3m$params$tradeDate, alldates), 0)
DC <- DiscountCurve(L3m$params, L3m$tsQuotes, T)
df <- data.table(Date=alldates,
@@ -188,7 +188,6 @@ getcusipcf <- function(params, cfdata, dist, tradedate=Sys.Date()){ conn <- unz(zip, filename)
data <- data.table(read.table(conn, sep="\t", header=TRUE, colClasses="character",
check.names=FALSE))
- browser()
data <- data[-c(1,2),]
if("Error" %in% names(data)){
k(NULL)
|
