[Returnanalytics-commits] r3155 - pkg/PortfolioAnalytics/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Sep 22 23:27:01 CEST 2013
Author: rossbennett34
Date: 2013-09-22 23:27:01 +0200 (Sun, 22 Sep 2013)
New Revision: 3155
Modified:
pkg/PortfolioAnalytics/R/random_portfolios.R
Log:
Correcting numbers generated for rp_simplex
Modified: pkg/PortfolioAnalytics/R/random_portfolios.R
===================================================================
--- pkg/PortfolioAnalytics/R/random_portfolios.R 2013-09-22 16:21:56 UTC (rev 3154)
+++ pkg/PortfolioAnalytics/R/random_portfolios.R 2013-09-22 21:27:01 UTC (rev 3155)
@@ -483,7 +483,7 @@
k <- ceiling(permutations / length(fev))
# generate uniform[0, 1] random numbers
- U <- runif(n=k*length(fev)*nassets, 0, 1)
+ U <- runif(n=k*nassets, 0, 1)
Umat <- matrix(data=U, nrow=k, ncol=nassets)
# do the transformation to the set of weights to satisfy lower bounds
More information about the Returnanalytics-commits
mailing list