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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 13 13:37:53 CEST 2015


Author: dacharya
Date: 2015-07-13 13:37:52 +0200 (Mon, 13 Jul 2015)
New Revision: 3805

Modified:
   pkg/Dowd/R/LogtESPlot2DHP.R
Log:
Minor mistakes in documentation.

Modified: pkg/Dowd/R/LogtESPlot2DHP.R
===================================================================
--- pkg/Dowd/R/LogtESPlot2DHP.R	2015-07-13 11:37:18 UTC (rev 3804)
+++ pkg/Dowd/R/LogtESPlot2DHP.R	2015-07-13 11:37:52 UTC (rev 3805)
@@ -97,9 +97,11 @@
     stop("Confidence level(s) must be greater than 0")
   }
   if (min(hp) <= 0){
-    stop("Confidence level(s) must be greater than 0")
+    stop("Holding period(s) must be greater than 0")
   }
   # VaR estimation  
+  cl.row <- dim(cl)[1]
+  cl.col <- dim(cl)[2]
   VaR <- investment - exp(((df - 2) / 2) * sigma[1,1] * sqrt(t(hp)) * qt(1 - cl[1,1], df)
                           + mu[1,1] * t(hp) %*% matrix(1, cl.row, cl.col) + log(investment)) # VaR
   



More information about the Returnanalytics-commits mailing list