Open etowle opened 2 years ago
I like it. I think it won't harm much if the nup function allows for either the variance-covariance matrix, or its factor.
Maybe we should complement this Nup with a minimum variance portfolio selection (you'd minimize "just" x @ Q @ X), or can this be covered by some paramters in this Nup already?
I think we (@etowle, @silkehorn, and myself) should team up and create a small variety of base models in the financial space. This one and Gurobi/gurobi-optimods#9 are the first two on the list, but they would share the interface (and implementation) of the extra gadgets (min. buy-in, max. allocations, etc.). We may be even able to integrate the online-problem (you start with an existing allocation) into each formulation. A third variation may be needed for minimizing a tracking error.
I would love to see the best way to include these in a multi-objective problem. Sharpe, TE, MV, etc...How would you link the y world and x in an efficient and convex way using the built in multi-objective method?
Hi @ChinSquared, could you please elaborate on what you mean here? Gurobi allows you to combine objectives either as a weighted sum, or in a hierarchical manner using priorities. Which are you looking for, and for which metrics?
Sure, for example, if you specify a hierarchical objective, first is to max Sharpe with a budget of 20 bps. Then minimize tracking error as the second objective. Other constraints in the portfolio are active like max trade, step size, max positions. Thanks!
To incorporate other performance metrics into the Sharpe ratio model and retain convexity, these other metrics would have to be modeled in the space of the y
variables (the reformulated variable space used in the Sharpe ratio model). This is because:
y
variablesx
-variable space and others in the y
- variable space, unless we link together the x
and y
variables with the non-convex constraints x = y / (e^T y)
At any rate, I fear a multi-objective, multiple-metric model with side constraints is outside the scope of what this Mod is trying to accomplish. That said, you could always use the Sharpe ratio model-building code as a starting point for building a more complex model:
Why this Nup?
Finance applications are probably plentiful enough to warrant their own nup category. If there is a dedicated Finance category, the maximal Sharpe ratio problem is popular and focused enough to be included.
Note that this is closely related to Gurobi/gurobi-optimods#9.
Does it fall under an existing category?
Other (Finance)
What will the API be?
where
Q
andmu
are scipy/numpy data structures. We could alternatively require the factor matrixH
as an argument instead of the covariance matrixQ
(whereQ = H.T @ H
), though I thinkQ
is more natural considering how the problem statement and model are written.Additional context
One complication: to be solved as a QP, the model needs to be reformulated in a different variable space. Additional constraints must be added in the variable space of the reformulated model. The mapping between the two models is straightforward, but this does create a barrier for people interested in modifying the underlying model.