[GSoC-PortA] Random portfolios

Ross Bennett rossbennett34 at gmail.com
Tue Sep 24 17:15:27 CEST 2013


Thanks for making me aware of this. I'll take a closer look and try to
figure out what is going on.

Ross
On Sep 24, 2013 8:03 AM, "Peter Carl" <peter at braverock.com> wrote:

> 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
> >
>
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/gsoc-porta/attachments/20130924/16d42391/attachment-0001.html>


More information about the GSoC-PortA mailing list