[R-SIG-Finance] mean-(scalar) portfolio optimization

Brian G. Peterson brian at braverock.com
Thu Aug 24 00:52:11 CEST 2006


> Brian G. Peterson wrote:
> >The R function solve.QP is used by several authors to solve classic
> >Markowitz mean-variance optimization using solve.QP and a covariance
> >matrix.
> >
> >Many other classes of portfolio optimization solve for the weighting
> >vector w using a scalar measure of risk, such as VaR, Sortino, Omega,
> >etc.
> >
> >Basically, this class of problems could be expressed as:
> >
> >let w' be the desired portfolio weights
> >let R be a set of returns for various instruments
> >
> >solve for a weighting vector w such that risk is minimized
> >
> >w' = min(risk(R))
> >
> >solve for a weighting vector w such that return is maximized over risk
> >budget y
> >
> >w'=max(mean(R)) such that risk(R)<.05
> >
> >and other similar formulations.
> >
> >solve.QP does not appear to be appropriate for these kinds of
> >optimization.  The functions 'optim' and 'optimize' seem to return
> > scalar values, solving only for a single minima or maxima, and not
> > for the vector (although I may be misunderstanding them).
> >
> >Does anyone have any pointers on how you might go about solving these
> >kinds of optimization problems in R?  I apologize if this is a simple
> >problem that I haven't been able to find a reference for online. I
> > will happily post the optimizer code once it's working.

On Wednesday 23 August 2006 12:01, Patrick Burns wrote:
> You are misunderstanding 'optim' -- it optimizes
> a function over one argument but that argument can be
> a vector.

Patrick, 

Thanks for correcting me on 'optim'.  I'll take a closer look.  I am aware 
of the problem of finding *a* minima, but not necessarily the best 
minima, in a series that could have more than one.

> However the utilities that you mention are hard to
> optimize.  See 'A Data-driven optimization heuristic
> for downside risk minimization' by Gilli et al.

This paper basically advocates a constrained brute-force estimation.

I'd like to avoid that if possible, for reasons of computational 
complexity.  That's clearly not the only approach being advocated in the 
current literature.


This one:
http://citeseer.ist.psu.edu/lemus99portfolio.html 
Portfolio Optimization w/ Quantile-based Risk Measures
Gerardo Jose Lemus Rodriguez, MIT, 1999

does a pretty good comparison of quantile-based, gradient methods, and 
non-gradient methods, and looks like it has some good prototypes that 
could be implemented.  From this paper, it looks like a non-parametric 
gradient estimator should give acceptable results with minimal 
computational effort.

This paper:
http://www.edhec-risk.com/site_edhecrisk/public/features/RISKReview.2005-12-19.1651
Investing in Hedge Funds: Adding Value through Active Style Allocation 
Decisions
Martellini, Vaissié, and Ziemann 2005

uses w' = min(VaR(95%)) with constraints on weight 
to good effect to establish strategic weighting, but does not provide the 
math for solving directly for the weighting vector, only expected return 
under a a four-moment CAPM model, or a four-moment Taylor expansion that 
could be transformed and solved for w'.

This paper:
http://www.banque-france.fr/gb/publications/ner/1-108.htm
Optimal Portfolio Allocation Under Higher Moments

solves for a differentiable series of nonlinear equations into a four 
moment CAPM model.  This is another relatively intensive approach that 
I'd like to avoid.

I could reference other papers, but I think that these are representative.  
I was hoping to spark some discussion of optimization around scalar 
measures of risk such as VaR, Omega, or Expected Shortfall.  

I'm hoping that others on this list have done something similar and would 
be willing to point me more directly towards implementation in R, as 
estimation and optimization function in R are still pretty foreign to me.

Regards,

  - Brian



More information about the R-SIG-Finance mailing list