[GSoC-PortA] Random portfolios

Brian G. Peterson brian at braverock.com
Tue Sep 24 21:02:11 CEST 2013


On 09/24/2013 12:59 PM, Ross Bennett wrote:
> The check for min_sum and max_sum is done right away in
> randomize_portfolio_v2. The main reason why I added this check and
> wiggle room for min_sum and max_sum inside of the function is to speed
> up generating the random portfolio and ensure that a reasonable number
> of portfolios can be generated.
>
> Another logical place for this check would be in the check_constraints
> function, this would prevent portfolios being eliminated. Even if we do
> this check here, constrained_objective will penalize a large number of
> sets of weights that do not sum to exactly 1. I think it also might make
> sense to add a check in optimize.portfolio and issue a warning to the
> user that min_sum and max_sum may be too restrictive. This will apply to
> optimize_method="random" and optimize_method="DEoptim" because we are
> using logic from random portfolios as a mapping function in DEoptim.
>

I think that when using random portfolios, the leverage constraint needs 
to be relaxed somewhat, or the generation just takes too long.

That's why those exist as parameters.  a 'full_investment' constraint is 
nice, but rather impractical when the time to generate gets to be very high.

I'd just expost the min_sum and max_sum anywhere they aren't already 
exposed, and I'd add a warning for the user if both are 1.

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


More information about the GSoC-PortA mailing list