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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 13 13:39:19 CEST 2015


Author: dacharya
Date: 2015-07-13 13:39:19 +0200 (Mon, 13 Jul 2015)
New Revision: 3807

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

Modified: pkg/Dowd/R/LogtVaR.R
===================================================================
--- pkg/Dowd/R/LogtVaR.R	2015-07-13 11:38:38 UTC (rev 3806)
+++ pkg/Dowd/R/LogtVaR.R	2015-07-13 11:39:19 UTC (rev 3807)
@@ -36,6 +36,7 @@
 #'
 #' @export
 LogtVaR <- function(...){
+  # Determine if there are four or five arguments, and ensure that arguments are read as intended
   if (nargs() < 5) {
     stop("Too few arguments")
   }
@@ -105,7 +106,7 @@
     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
   y <- investment - exp(((df - 2) / 2) * sigma %*% sqrt(t(hp)) %*% qt(1 - cl, df)



More information about the Returnanalytics-commits mailing list