diff options
Diffstat (limited to 'R')
| -rw-r--r-- | R/load_cf.R | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/R/load_cf.R b/R/load_cf.R index 241543b6..1e4b1b6b 100644 --- a/R/load_cf.R +++ b/R/load_cf.R @@ -106,9 +106,6 @@ getdealcf <- function(dealnames, zipfiles, tradedate=Sys.Date()){ tranches <- "COLLAT"
}else{
tranches <- c("COLLAT_INITIAL", "COLLAT_REINVEST")
- ## if(dealname=="octag11"){
- ## tranches <- c("COLLAT_USD_INITIAL", "COLLAT_USD_REINVEST")
- ## }
}
for(tranche in tranches){
cfdata[[dealname]][[tranche]] <- callCC(function(k){
@@ -201,7 +198,7 @@ getcusipcf <- function(params, cfdata, dist, tradedate=Sys.Date()){ }
data <- data[,Date:=as.Date(Date, "%b %d, %Y")]
data <- data.table(Date=data[,Date],data[,lapply(.SD,sanitize.column),.SDcols=2:6],key="Date")
- data[,Balance:=max(Balance-`Accum Interest Shortfall`, 0), by=1:nrow(data)]
+ data[,Balance:=max(Balance-`Accum Interest Shortfall`, 0), by=.EACHI]
r[j,] <- as.numeric(df[data, roll=TRUE][,list(Cashflow=temp <- sum(Cashflow*Discounts),
Principal=sum(Principal*Discounts),
Interest=sum(Interest*Discounts),
|
