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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 13 13:36:45 CEST 2015


Author: dacharya
Date: 2015-07-13 13:36:45 +0200 (Mon, 13 Jul 2015)
New Revision: 3803

Modified:
   pkg/Dowd/R/LogtESDFPerc.R
Log:
Minor mistake in documentation and restriction to input data corrected.

Modified: pkg/Dowd/R/LogtESDFPerc.R
===================================================================
--- pkg/Dowd/R/LogtESDFPerc.R	2015-07-13 11:35:13 UTC (rev 3802)
+++ pkg/Dowd/R/LogtESDFPerc.R	2015-07-13 11:36:45 UTC (rev 3803)
@@ -14,8 +14,8 @@
 #' @param hp ES holding period and must be a a scalar
 #' @return Percentiles of ES distribution function
 #' @note The input arguments contain either return data or else mean and 
-#' standard deviation data. Accordingly, number of input arguments is either 5 
-#' or 6. In case there 5 input arguments, the mean and standard deviation of 
+#' standard deviation data. Accordingly, number of input arguments is either 6 
+#' or 8. In case there 6 input arguments, the mean and standard deviation of 
 #' data is computed from return data. See examples for details.
 #'  
 #' @references Dowd, K. Measuring Market Risk, Wiley, 2007.
@@ -109,11 +109,11 @@
   if (n < 0) {
     stop("Number of observations must be non-negative")
   }
-  if (cl > 1){
+  if (perc > 1){
     stop("Chosen percentile must not exceed 1")
   }
-  if (cl <= 0){
-    stop("Confidence level must be positive")
+  if (perc <= 0){
+    stop("Chosen percentile must be positive")
   }
   if (cl >= 1){
     stop("Confidence level(s) must be less than 1")



More information about the Returnanalytics-commits mailing list