I have been trying to implement an optimization problem in Docplex
using Python
API. Although I have already done some problems in Docplex I am facing some challenges to do this one.
We have got rho
as correlation element's matrix, V
is the set of elements and V(k)
is the each set of elements (assets) separately, then the union of V(k)
= V
and the intersection of the elements of the sets V(k)
is empty. k
represents each (asset) set in V. For example, imagine we have 2 groups K: Reits and Stocks and in each group have 4 elements: ´V_reits = [0,1,2,3]´ and ´V_stocks = [0,1,2,3]´. V = [[V_reits], [V_stocks]] = [[0,1,2,3], [4,5,6,7]]
then K=2
.
In addition, C
is the wallet size, I mean how many items we want to select in set V? For instance, lets say we have V = V_stocks = [0,1,2,3]
then V[k] = [[0,1,2,3]]
and we set C = 2
, so we want to select 2 elements in the set V[k] and for this problem, the result would be PNVL3.SA and MOVI3.SA (-0.2561) the minimum.
Below is the mathematical description with the correlation matrix which I am using to solve this.
Anybody could help me implement this in Docplex
with Python
?