Can one make a second call to fmincon within a first call to fmincon? That is, does Matlab allow nested calls to fmincon?
I seek a method to solve a min-max problem. I wish to minimize f(D,A,b(A)), where the function b(.) solves the secondary problem: maximize g(D,A,B)) with optimal solution B=b(A). In this problem, D is data (stock returns), and A and B are vectors of parameters. The function is nonlinear, and there are simple linear constraints on A & B.
I set up the problem by (i) a call to fmincon, minimizing f(.) with respect to A, and within the function (script) defining f(.) a second call to fmincon to minimize -g(.). The second call generates an error "Not enough input arguments". This suggests to me that it is not possible in Matlab to nest these calls.
Am I correct in this conclusion? If so, what suggestions can you make that might allow me to solve this problem? Any advice is appreciated, and if necessary I can send the code and data.
Thanks very much,