[GSoC-PortA] Random portfolios

Peter Carl peter at braverock.com
Tue Sep 24 17:02:58 CEST 2013


Fair point.  I get the same result when I use high values for
max_permutations.  That attribute should probably be referenced in the
function documentation under details, so that users know it can be passed
through dots.

Same result though.  When I call rp_sample directly:
rp_sample(init.portf, permutations=1000)
... I get 1000 rows back.

So something's happening in the dispatch code?

pcc
-- 
Peter Carl
http://www.braverock.com/peter

> 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
> _______________________________________________
> GSoC-PortA mailing list
> GSoC-PortA at lists.r-forge.r-project.org
> http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta
>




More information about the GSoC-PortA mailing list