Re: [ojAlgo-user] Need help with constraints
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2018-09-20 20:17:43
|
Yes. Only problem will be if n is very large. > On 20 Sep 2018, at 05:42, Ab115 Subscribe via ojAlgo-user <oja...@li...> wrote: > > Thanks anders checked that. Using the expression model, I will have to decide which asset has to be part of the portfolio and which doesn't using the binary variable. However My problem is if you have n total assets, we need to select an optimal portfolio such that it comprises a minimum of k number assets out of n and maximum of n assets . Which means that you have to consider all the possible combinations. Can we do this using the expression model? > > > On Wed, Sep 19, 2018, 11:39 AM Anders Peterson <an...@op...> wrote: > Hi, > > You need to add a set of binary variables that indicates inclusion or not. This can’t be done with the MarkowitzModel class. You have to use ExpressionsBasedModel directly. > > /Anders > > > > On 18 Sep 2018, at 20:33, Ab115 Subscribe via ojAlgo-user <oja...@li...> wrote: > > > > Hi, > > > > I am investigating the ojalgo-finance model for an portfolio optimization problem. We have a requirement to set a concentration constraint which I am setting using the limits of the Markowitz model. However we also need to add a constraint on the minimum number of assets to be part of the portfolio. Can someone please let me know how to add this constraint? > > > > Thanks > > Ab > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |