diff options
Diffstat (limited to 'R/calibration.R')
| -rw-r--r-- | R/calibration.R | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/R/calibration.R b/R/calibration.R index 4e8cac31..23441583 100644 --- a/R/calibration.R +++ b/R/calibration.R @@ -66,11 +66,7 @@ set.tranchedata <- function(index, tradedate){ index$quotes <- data.frame(maturity=index$maturity, refspread=temp$indexrefspread[1], refprice=temp$indexrefprice[1]) - if(index$name=="ig19" || index$name=="ig21"){ - index$quotes$spread <- 0.01 - }else{ - index$quotes$spread <- index$quotes$refspread*1e-4 - } + index$quotes$spread <- couponfromindex(index, index$tenor)*1e-4 index$cs <- couponSchedule(IMMDate(tradedate, noadj=TRUE), index$maturity,"Q", "FIXED", 1, 0, tradedate, IMMDate(tradedate, "prev")) if(!is.na(index$quotes$refprice) && index$quotes$refprice != 0){ |
