Obj: | x1’Qx1-λ1 μ'x1 | +x2’Qx2-λ2 μ'x2 | +x3’Qx3-λ3 μ'x3 | +x4’Qx4-λ4 μ'x4 |
S.t. | ∑ix1,i=1 | |||
∑ix2,i=1 | ||||
∑ix3,i=1 | ||||
∑ix4,i=1 |
Note that xk is a vector rather than a scalar, and that I ignored the non-negativity conditions xk≥0. A similar approach can be used for any problem where the individual problems are relatively small. A good example is DEA where we achieve better performance by batching small problems into bigger ones.
The OML formulation of this combined portfolio model can look like:
Here the parameter Selected indicates whether an instrument can be part of the portfolio.Model[
Parameters[Sets,I,K],
Parameters[Integers,Selected[I]],
Parameters[Reals,Return[I]],
Parameters[Reals,Lambda[K]],
Parameters[Reals,Covar[I,I]],Decisions[Reals[0,Infinity],Alloc[K,I]],
Constraints[
Foreach[{k,K},FilteredSum[{i,I},Selected[i]>0,Alloc[k,i]]==1]
],Goals[Minimize["Overall"->
Sum[{k,K},
FilteredSum[{i,I},Selected[i]>0,
FilteredSum[{j,I},Selected[j]>0,Alloc[k,i]*Covar[i,j]*Alloc[k,j]]]
- Lambda[k]*FilteredSum[{i,I},Selected[i]>0,Return[i]*Alloc[k,i]]
]
]]
]
No comments:
Post a Comment