Skip to content
Prev 5676 / 15274 Next

Optimization Constraint Violations

fPortfolio uses quadprog underneath, so I don't know that using quadprog 
directly does anything other than lose the portability of the portfolio 
specification in fPortfolio.

Mattias raises the correct point, that fPortfolio will 'fall back' on 
unconstrained optimization when optimization is not possible with a given 
constraint set.  I believe that the unconstrained optimization is always 
performed, such that the efficient frontier is known and may be plotted against 
the constrained efficient frontier.

It is possible in any portfolio optimization problem, Markowitz MV or not, to 
specify constraints and objectives that are unreasonable.  Pat Burns has 
correctly suggested in his many writings that random portfolios can help to 
define the shape of the available space.  A portfolio manager also rapidly 
wants to specify constraints or objectives that are not amenable to a quadratic 
solution, and then other optimization engines are required.  Linear and Conical 
solvers are available in fPortfolio for some more robust approaches. Fully 
non-linear approaches such as random portfolios, simulated annealing, and 
differential evolution are available in other R packages.

However, none of this will matter if the combination of objectives and 
constraints are unreasonable.

And, to echo the other posters, please do take the time to construct a minimal 
example that shows what you're seeing.  It is really not to hard to either use 
publicly available data, or to disguise your data, such that we can see what's 
causing the problem.

Regards,

     - Brian
julien cuisinier wrote: