Skip to content

Question: Is there a way to set a minimum allocation? #2

Closed

Description

@mattparlane

Hi Robert... This is awesome, thanks so much for your work on this. I have two related questions:

  1. I've found that the library is telling me to allocate 0.1% to something, and that's just not realistic for me, partly because my investment platform has a minimum purchase of $250. That's a cool quarter mil... :) I tried weight_bounds=(0.1, 1), but that didn't do what I thought it would, which makes sense now that I think about it. Is there a way to set minimum allocations?

  2. I also tried setting gamma, but that basically told me to buy a roughly equal weight of every possible asset. That may well be optimal, but it's a pain for similar reasons. Is there a way to limit the number of assets chosen?

Thanks!

Activity

  1. robertmartin8 commented on Sep 4, 2018

    @robertmartin8
    Collaborator

    Hi Matt,

    Apologies for the late response, I haven't properly configured notifications.

    1. weight_bounds is meant to be able to do that. The below code should mean that no weights are below 2%.

    ef = EfficientFrontier(mu, S, weight_bounds=(0.02,1))

    But note that you must consider the total number of assets in your portfolio before you set the bounds. So if you are optimising 20 assets, you cannot set the lower bound to less than 1/20 = 0.05, because all weights must sum to one. Perhaps this is why you had difficulty with weight_bounds=(0.1, 1).

    1. The point of gamma is to reduce the extreme positions (very large weights or very small weights). The higher the gamma you use, the closer the portfolio will be towards the equal weight portfolio. Try a lower gamma.

    Please feel free to reach out if you have any other issues, I'll try to respond more promptly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions