[Returnanalytics-commits] r2057 - pkg/PerformanceAnalytics/sandbox/Meucci/demo

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jun 24 19:20:00 CEST 2012


Author: mkshah
Date: 2012-06-24 19:20:00 +0200 (Sun, 24 Jun 2012)
New Revision: 2057

Modified:
   pkg/PerformanceAnalytics/sandbox/Meucci/demo/DetectOutliersviaMVE.R
Log:
Cleaned file and checked against Meucci's Matlab Code.

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/demo/DetectOutliersviaMVE.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/demo/DetectOutliersviaMVE.R	2012-06-24 17:14:36 UTC (rev 2056)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/demo/DetectOutliersviaMVE.R	2012-06-24 17:20:00 UTC (rev 2057)
@@ -1,9 +1,8 @@
-
 # Example 1: Two-asset example with -.9 correlation
 # generate covariance matrix to sample "good returns"
 sig = matrix( c( 1 , 1 ) , nrow = 1 ); r = -.9
 correlationMatrix = rbind( cbind( 1 , r ) , cbind( r , 1 ) ) # generate 2x2 correlation matrix
-covarianceMatrix = diag(sig) * correlationMatrix * diag(sig) ; rm( correlationMatrix ) ; rm( sig ) ; rm( r ) # covert to covariance matrix
+covarianceMatrix = diag(sig) * correlationMatrix * diag(sig) ; rm( correlationMatrix ) ; rm( sig ) ; rm( r ) # convert to covariance matrix
 
 # co-mingle sample from good covariance matrix with bad outliers and shuffle rows
 corruptSample = NoisyObservations( 50 , 7 , covarianceMatrix , shuffle = TRUE ) # returns 50 good samples and 7 bad samples



More information about the Returnanalytics-commits mailing list