aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/VaR.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/VaR.R b/R/VaR.R
index 90914b81..6f004bee 100644
--- a/R/VaR.R
+++ b/R/VaR.R
@@ -22,7 +22,7 @@ index <- load.index("hy19", "5yr", tradedate)
rho <- get.skews('HY23', '5yr')
colnames(rho) <- c("date", "15 Corr", "25 Corr", "35 Corr")
-skew.shocks <- apply(log(-log(rho)), 2, diff)
+skew.shocks <- apply(log(-log(rho[,-1])), 2, diff)
pvshocks1 <- BCtranche.VaR(index, skew.shocks)
shock.spreads <- diff(log(get.indexquotes('HY', 21, '5yr')$closespread))