%% Set the Solver Type as 'fmincon' and Use an optimoptions Object to Set the Algorithm for a PortfolioCVaR Object
% Use 'fmincon' as the solverType and use an optimoptions object to set the algorithm to 'interior-point' and to turn off the display.

p = PortfolioCVaR;
options = optimoptions('fmincon', 'Algorithm', 'interior-point', 'Display', 'off');
p = setSolver(p, 'fmincon', options);
display(p.solverOptions.Algorithm);
display(p.solverOptions.Display);

% Copyright 2015 The MathWorks, Inc.