[Returnanalytics-commits] r3724 - pkg/Dowd/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jun 23 22:41:11 CEST 2015


Author: dacharya
Date: 2015-06-23 22:41:10 +0200 (Tue, 23 Jun 2015)
New Revision: 3724

Modified:
   pkg/Dowd/R/AdjustedNormalESHotspots.R
Log:
Mistake in for loop corrected.

Modified: pkg/Dowd/R/AdjustedNormalESHotspots.R
===================================================================
--- pkg/Dowd/R/AdjustedNormalESHotspots.R	2015-06-23 20:01:39 UTC (rev 3723)
+++ pkg/Dowd/R/AdjustedNormalESHotspots.R	2015-06-23 20:41:10 UTC (rev 3724)
@@ -89,7 +89,7 @@
   # Portfolio ES
   es <- double(length(positions))
   ies <- double(length(positions))
-  for (j in range(1: length(positions))) {
+  for (j in 1:length(positions)) {
     x <- positions
     x[j] <- 0
     sigma <- x %*% vc.matrix %*% t(x) / (sum(x)^2)



More information about the Returnanalytics-commits mailing list