[GSoC-PortA] Random portfolios

Brian G. Peterson brian at braverock.com
Tue Sep 24 16:33:07 CEST 2013


On 09/24/2013 09:28 AM, Peter Carl wrote:
> The random_portfolios function isn't generating the correct number of
> permutations.
>
>> >random_portfolios(portfolio=init.portf, permutations=1000)
> gives me a result with 317 weight vectors, rather than 1000.
>
> I think that there's a loop missing: when the number of lines is less than
> permutations, the function needs to generate more, check for unique
> solutions, and repeat until there are (in this case) 1000 weight vectors.
>
> Although (and it's difficult to tell), on their own the charts seem to
> generate about the right number?  Or maybe not...

I suspect that given your constraints you're just hitting 
max_permutations.

All that code is still there, so it seems most likely that you just 
don't have max_permutations high enough, or that your granularity on the 
sequence is too high (e.g. you're using a step size of .01, and should 
try .005)

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock


More information about the GSoC-PortA mailing list