How to use fsolve with constraints?
4 views (last 30 days)
Show older comments
Hi,
I am using fsolve to compute the portfolio weights of some assets.
I would like fsolve to calculate these weights with a short-selling constraint, so that any asset weight could be less than 0.
How can I do this?
Thank you very much.
0 Comments
Accepted Answer
Matt J
on 14 Jan 2014
Edited: Matt J
on 14 Jan 2014
LSQNONLIN is more or less a version of FSOLVE which supports upper and lower bound constraints. For more complicated constraints, you would need FMINCON, most likely.
It sounds like your problem actually has no constraints if the asset weights can be both positive and negative.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!