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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 20 00:36:36 CEST 2015


Author: dacharya
Date: 2015-08-20 00:36:35 +0200 (Thu, 20 Aug 2015)
New Revision: 3973

Modified:
   pkg/Dowd/R/NormalESHotspots.R
Log:
Correction of example and incorrect error message changed.

Modified: pkg/Dowd/R/NormalESHotspots.R
===================================================================
--- pkg/Dowd/R/NormalESHotspots.R	2015-08-19 22:35:59 UTC (rev 3972)
+++ pkg/Dowd/R/NormalESHotspots.R	2015-08-19 22:36:35 UTC (rev 3973)
@@ -19,15 +19,13 @@
 #'    # Hotspots for ES for randomly generated portfolio
 #'    vc.matrix <- matrix(rnorm(16),4,4)
 #'    mu <- rnorm(4,.08,.04)
-#'    skew <- .5
-#'    kurtosis <- 1.2
 #'    positions <- c(5,2,6,10)
 #'    cl <- .95
 #'    hp <- 280
-#'    AdjustedNormalESHotspots(vc.matrix, mu, skew, kurtosis, positions, cl, hp)
+#'    NormalESHotspots(vc.matrix, mu, positions, cl, hp)
 #' 
 #' @export
-NormalESHotspots <- function(vc.matrix, mu, skew, kurtosis, positions,
+NormalESHotspots <- function(vc.matrix, mu, positions,
                                     cl, hp){
   
   # Check that positions vector read as a scalar or row vector
@@ -47,7 +45,7 @@
     stop("Positions vector and expected returns vector must have same size")
   }
   if (max(dim(vc.matrix)) != max(dim(positions))){
-    stop("Positions vector and expected returns vector must have same size")
+    stop("Positions vector and variance-covariance matrix must have compatible dimensions")
   }
   
   # Check that inputs obey sign and value restrictions



More information about the Returnanalytics-commits mailing list