Why do I get a warning and NaNs in my output when using the PORTOPT function from the Financial Toolbox 3.6 (R2009a)?

2 views (last 30 days)
I am using the PORTOPT command from Financial Toolbox 3.6 (R2009a) and am getting a warning at the command prompt:
[PortRisk, PortReturn, PortWts] = portopt(eqrtns, covar, numport, [],ConSet);
Warning: Candidate solution is infeasible due to a bad pivot.
> In lcprog>lcprealitycheck at 299
In lcprog at 189
In qplcprog at 244
In portopt at 342
In cust_rep at 3
Warning: Candidate solution is infeasible due to a bad pivot.
> In lcprog>lcprealitycheck at 299
In lcprog at 189
In qplcprog at 244
In portopt at 342
In cust_rep at 3
Warning: Candidate solution is infeasible due to a bad pivot.
....
Also the evaluated PortRisk parameter contains NaNs:
>> PortRisk
PortRisk =
0.0425
0.0486
0.0617
NaN
NaN
NaN
0.1515
0.1865
0.2287
0.2911

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Dec 2009
This issue generally happens when the problem is degenerate (overconstrained in some instances). In such situations the solver will not be able find the optmimum point and the output can be NaNs.
To workaround this, re-evaluate your constraint matrix and see that the optimization problem is well posed.

More Answers (0)

Tags

No tags entered yet.

Products


Release

R2009a

Community Treasure Hunt

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

Start Hunting!