diff options
Diffstat (limited to 'R/intex_deal_functions.R')
| -rw-r--r-- | R/intex_deal_functions.R | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/R/intex_deal_functions.R b/R/intex_deal_functions.R index 42d9f452..89fecb40 100644 --- a/R/intex_deal_functions.R +++ b/R/intex_deal_functions.R @@ -348,7 +348,7 @@ get.reinvassets <- function(dealname, tradedate){ return( r )
}
-forwardportfolioprice2 <- function(cdrmonthly, recoverymonthly, startdate, maturity,
+intexportfolio.forwardprice <- function(cdrmonthly, recoverymonthly, startdate, maturity,
coupontype, margin, liborfloor){
if(missing(liborfloor)||is.na(liborfloor)){
currentcoupon <- margin
@@ -387,9 +387,9 @@ compute.reinvprices <- function(dealname, cdrmonthly, recoverymonthly, params, r asset <- reinvassets[[assetname]]
coupon <- if(asset$coupontype=="FLOAT") params$reinvfloat else params$reinvfixed
reinvprices[[assetname]] <- foreach(date = iter(cdrmonthly$date), .combine=c) %dopar% {
- 100 * forwardportfolioprice2(cdrmonthly.dt, recoverymonthly.dt, date,
- min(date+rollingmaturity, maturity),
- asset$coupontype, coupon, asset$liborfloor/100)
+ 100 * intexportfolio.forwardprice(cdrmonthly.dt, recoverymonthly.dt, date,
+ min(date+rollingmaturity, maturity),
+ asset$coupontype, coupon, asset$liborfloor/100)
}
}
}
|
