[Returnanalytics-commits] r2254 - in pkg/PortfolioAnalytics: R sandbox

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 20 02:33:51 CEST 2012


Author: hezkyvaron
Date: 2012-08-20 02:33:51 +0200 (Mon, 20 Aug 2012)
New Revision: 2254

Modified:
   pkg/PortfolioAnalytics/R/optimize.portfolio.R
   pkg/PortfolioAnalytics/sandbox/sample_pso.R
Log:
- updated out$ in ROI and deleted objective_measures
- found typo in sample_pso

Modified: pkg/PortfolioAnalytics/R/optimize.portfolio.R
===================================================================
--- pkg/PortfolioAnalytics/R/optimize.portfolio.R	2012-08-19 22:16:28 UTC (rev 2253)
+++ pkg/PortfolioAnalytics/R/optimize.portfolio.R	2012-08-20 00:33:51 UTC (rev 2254)
@@ -351,7 +351,7 @@
     weights <- roi.result$solution[1:N]
     names(weights) <- colnames(R)
     out$weights <- weights
-    out$objective_measures <- roi.result$objval
+    out$out <- roi.result$objval
     out$call <- call
   } ## end case for ROI
 

Modified: pkg/PortfolioAnalytics/sandbox/sample_pso.R
===================================================================
--- pkg/PortfolioAnalytics/sandbox/sample_pso.R	2012-08-19 22:16:28 UTC (rev 2253)
+++ pkg/PortfolioAnalytics/sandbox/sample_pso.R	2012-08-20 00:33:51 UTC (rev 2254)
@@ -18,7 +18,7 @@
   if (sum(w)==0) {w <- w + 1e-2}
   w <- w/sum(w)
   CVaR <- ES(weights= w, 
-             method="gaussian", max.
+             method="gaussian",
              portfolio_method="component",
              mu=mu,
              sigma=sigma)



More information about the Returnanalytics-commits mailing list