I would like to set up the quadprog constraint for minimum position in each asset as 0 or 0.5%.
Because the solver returns a whole bunch of tiny positions between 0-0.5% which are unrealistic to implement.
Thanks.

2 件のコメント

Torsten
Torsten 2022 年 5 月 9 日
If "position" are solution variables, set their lower bounds (lb in the call to quadprog) to 0.005, e.g.
Patrick
Patrick 2022 年 5 月 9 日
Thanks Torsten,
If the lower bounds of asset are set to 0.5%, then all assets in the optimization universe would need to have at least 0.5% weights.
Here's an example to illustrate the desired setting:
I have 1000 assets in the optimization universe, a sub-group of which (determined by optimizer) would have a minimum weights of 0.5%, where the rest would stay at 0% as the final solution.
Basically, I would like to have a discontinuous constraint.

サインインしてコメントする。

 採用された回答

Matt J
Matt J 2022 年 5 月 10 日
編集済み: Matt J 2022 年 5 月 10 日

0 投票

One possible alternative would be to use minL1lin,
instead of quadprog. An L1-norm cost function will tend to have sparser solutions than a quadratic cost. So, that may be a way of reducing small residual non-zeros in the solution.

1 件のコメント

Patrick
Patrick 2022 年 5 月 10 日
Thanks Matt,
This is probably the only way we can set up such a discontinuous constraint.

サインインしてコメントする。

その他の回答 (2 件)

Matt J
Matt J 2022 年 5 月 9 日
編集済み: Matt J 2022 年 5 月 9 日

0 投票

If the lower bounds of asset are set to 0.5%, then all assets in the optimization universe would need to have at least 0.5% weights.
lb is a vector-valued argument. Set each lb(i) to the appropriate lower bound.

2 件のコメント

Patrick
Patrick 2022 年 5 月 9 日
Thanks Matt,
In this case, I don't need to differentiate constraints for each asset, but rather a one-size-fits-all is applied.
The tricky thing is we don't know ex-ante which asset is sitting at 0% and which asset has a non-zero weight and need to be greater than 0.5%, due to the discontinuous nature of constaint.
Matt J
Matt J 2022 年 5 月 10 日
If it's a discontinuous constraint, it's not a quadratic program anymore.

サインインしてコメントする。

Matt J
Matt J 2022 年 5 月 10 日

0 投票

If you have the Global Optimization Toolbox, you could also try using ga() with additional binary variables b(i). Denoting your originally set of continuous variables as x(i), you could impose linear inequality constraints x(i)-0.5*b(i)>=0 to enforce your bounds.

1 件のコメント

Patrick
Patrick 2022 年 5 月 10 日
Thanks Matt,
I like this one as well.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeQuadratic Programming and Cone Programming についてさらに検索

製品

リリース

R2020a

質問済み:

2022 年 5 月 9 日

コメント済み:

2022 年 5 月 10 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by