Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Constrained vs. unconstrained optimization
Replies: 5   Last Post: Jun 14, 2012 4:53 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
werting Shin

Posts: 15
Registered: 9/26/10
Re: Constrained vs. unconstrained optimization
Posted: Jun 13, 2012 1:20 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Sargondjani" wrote in message <jqc7lh$f9e$1@newscl01ah.mathworks.com>...
> you could try the following things:
> - provide an analytical gradient. this might take quite some time to program, but it will greatly enhance the convergence (especially given small portfolio weights and small change in sharpe ratio). i would seriously recommend this, if feasible
>
> - if you dont want this, at least use central difference ('FinDiffType', 'central'). this takes more calculations per step, but the convergence is faster (quadratic compared to linear)
> - scale problem (in sqp: 'ScaleProblem', 'obj-and-constr' or you can do this yourself. try to get the magnitudes of the gradients to be similar)
> - it may also help to set the size of the finite difference steps. check the DiffMinChange and FinDiffRelStep (this last one was only recently introduced in matlab, in 2011 or 2012 i think)


Thanks for your advice! Providing the analytical gradient helped reduce instances of error, and I actually scaled the whole problem by multiplying 1e12 to the obj fcn so that the fvals were not moving at something less than machine epsilon, and this reduced the errors a lot too. But for some combinations of assets, the problem still exists :(



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.