Portfolio cardinality constraint in a genetic algorithm

Hello,
does anybody have a good way to include a portfolio cardinality constraint in an elegant way in a genetic algorithm? I want to form a portfolio of exactly 50 stocks out of a set of 300 stocks, each of those in the portfolio should have a weighting between 1% and 3% and the others need to be forced to zero.
Happy to see your ideas :-)

 採用された回答

Alan Weiss
Alan Weiss 2015 年 9 月 16 日

0 投票

Well, not in a genetic algorithm, but you might find this example using MILP to approximate MIQP to be relevant.
Alan Weiss
MATLAB mathematical toolbox documentation

1 件のコメント

Christian Schwehm
Christian Schwehm 2015 年 9 月 16 日
Hi Alan,
cheers for the hint, but I cannot really use a MILP, as I want to run the heuristic with a rather complex fitness function. I could include a penalty term for any deviations from the "correct" cardinality, but the GA would need to do a whole lot of "useless" computations, that could be saved, if it were possible to restrict the number of weights>0 to a fixed number...
Any ideas?
Christian Schwehm

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

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by