diff options
Diffstat (limited to 'R/load_cf.R')
| -rw-r--r-- | R/load_cf.R | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/R/load_cf.R b/R/load_cf.R index d3b8bcd5..8d806bb8 100644 --- a/R/load_cf.R +++ b/R/load_cf.R @@ -24,7 +24,8 @@ source(file.path(root.dir, "code", "R", "cds_utils.R")) source(file.path(root.dir, "code", "R", "intex_deal_functions.R"))
source(file.path(root.dir, "code", "R", "optimization.R"))
source(file.path(root.dir, "code", "R", "interpweights.R"))
-load.index("hy21")
+source(file.path(root.dir, "code", "R", "mlpdb.R"))
+index <- load.index("hy21")
calibration.date <- addBusDay(tradedate, -1)
exportYC(calibration.date)
@@ -227,7 +228,7 @@ compute.delta <- function(indexdist, dealweight, cusip.pv, tradedate=Sys.Date(), calibration.date <- addBusDay(tradedate)
## we assume the index is fully funded - need to be changed depending
## on how we fund the swaps (hence floating coupon instead of fixed)
- cs <- couponSchedule(IMMDate(tradedate), hy21$maturity, "Q",
+ cs <- couponSchedule(IMMDate(tradedate), index$maturity, "Q",
"FLOAT", 0.05, 0, calibration.date)
nT <- dim(indexdist$L)[2]
Ngrid <- dim(indexdist$L)[1]
|
