diff options
| -rw-r--r-- | R/calibrate_tranches_BC.R | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R/calibrate_tranches_BC.R b/R/calibrate_tranches_BC.R index 09aa229f..9d0867f5 100644 --- a/R/calibrate_tranches_BC.R +++ b/R/calibrate_tranches_BC.R @@ -81,7 +81,7 @@ thetas <- matrix(0, length(bus.dates), n.tranches) rhos <- matrix(0, length(bus.dates), n.tranches)
corr01 <- matrix(0, length(bus.dates), n.tranches)
durations <- matrix(0, length(bus.dates), n.tranches)
-EL <- matrix(0, length(bus.dates), n.tranches)
+ELmat <- matrix(0, length(bus.dates), n.tranches)
for(i in seq_along(bus.dates)){
tradedate <- bus.dates[i]
@@ -117,7 +117,7 @@ for(i in seq_along(bus.dates)){ corr01[i,] <- BCtranche.corr01(index)
temp <- BCtranche.pv(index, protection=TRUE)
durations[i,] <- (temp$cl-cdsAccrued(tradedate, index$tranche.running))/index$tranche.running
- EL[i,] <- -temp$pl*diff(index$K)
+ ELmat[i,] <- -temp$pl*diff(index$K)
print(tradedate)
}
risk.numbers <- data.frame(deltas, gammas, thetas, rhos, corr01, durations, EL)
|
