Portfolio object: asset weights as 0 or >=0.01 ?
1 view (last 30 days)
Show older comments
Hi,
I have the following (simplified) mean-variance optimization problem:
p = Portfolio('AssetList', A, ...)
pwgt = p.estimateFrontier(numportfolio)
rwgt = p.maximizeSharpeRatio
I wish not to get "very small" asset weights. I.e. i wish to get rwgt not equal to (0 < rwgt < 0.01). In other words I wish to get rwgt = 0 or >= 0.01.
I see two options, but cannot get them working as wanted.
Option 1 (code runs, but I still get (0 < rwgt < 0.01)):
...
rwgt = p.maximizeSharpeRatio;
if rwgt < 0.01
rwgt = 0
end
Option 2 (via some constraint property, my best guess is Inequality):
...
h = % how to define as range 1.0e-100:9.999999e-3 ?
p = Portfolio('AssetList', A, 'aInequality', B, 'bInequality', h, ...);
p = p.setInequality(B, h);
Thankful for advice.
0 Comments
Answers (0)
See Also
Categories
Find more on Portfolio Optimization and Asset Allocation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!