quadprog returning non-optimal results
Show older comments
I have been using quadprog to solve a mean-variance optimisation problem for years, however noticed recently that the results returned seem to be unstable.
We run quadprog over 1000s of iterations (for loop), changing the risk tolerance (lambda) by an incremental amount for each iteration to come up with an efficient frontier.
We are using the interior point convex algorithm to run the optimisation in quadprog and have the below settings:
opts = optimoptions('quadprog',...
'Algorithm','interior-point-convex','MaxIter', 1e6, 'TolFun', 1e-10, 'TolX', 1e-10, 'TolCon', 1e-10);
This normally results in a relatively smooth curve/frontier. However, recently I have found if I constrain the upper and lower bounds on w* even a bit the results easily become nonsensical, i.e., the optimal output vector x jumps around rather than evolving smoothly for different levels of risk tolerance. What is happening is either quadprog will max out iterations and stop running or if I set tolerances lose enough, it will run but the resulting efficient froniter has a lot of kinks. Why I am trying to understand is:
- When the iterations max out, if you print more detailed output you can see that there is no improvement in various measures such as f(x), etc., which is why it is not finding a solution. What I don’t understand is why I am not getting a different exit flag like -2 (problem infeasible), -3 (problem unbounded), -6 (non-convex problem detected). If the problem isn’t infeasible, unbounded or non-convex, why is it maxing out without a solution?
- Similarly, if I am getting an efficient curve with a lot of kinks surely that’s a sign that the result is not optimal (not a global minimum). Why is the optimisation not breaking then with any of the above exit flags? Or is something else going on?
The above are essentially the same question I believe, but posed in a different way.
Answers (0)
Categories
Find more on Quadratic Programming and Cone Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!