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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 22 15:48:20 CEST 2015


Author: dacharya
Date: 2015-06-22 15:48:19 +0200 (Mon, 22 Jun 2015)
New Revision: 3700

Modified:
   pkg/Dowd/R/HSES.R
Log:
Wrongly ported function corrected (ceil -> ceiling).

Modified: pkg/Dowd/R/HSES.R
===================================================================
--- pkg/Dowd/R/HSES.R	2015-06-22 13:47:35 UTC (rev 3699)
+++ pkg/Dowd/R/HSES.R	2015-06-22 13:48:19 UTC (rev 3700)
@@ -86,7 +86,7 @@
     upper.tail.losses <- losses.data[upper.k] # Creates data set of upper tail loss obs.
 	upper.es <- mean(upper.tail.losses) # Upper ES
 	# Deal with loss observation just below VaR to derive lower ES
-	lower.index <- ceil(index)
+	lower.index <- ceiling(index)
 	lower.VaR <- losses.data[lower.index] # Lower VaR
 	lower.k <- which(lower.VaR <= losses.data) # Finds indices of lower tail loss data 
 	lower.tail.losses <- losses.data[lower.k] # Creates data set of lower tail loss obs.



More information about the Returnanalytics-commits mailing list