# Expected shortfall minimization as portfolio objective

I'm trying to solve portfolio problem with minimising its Expected shortfall, assuming the returns follow a stable distribution. If I'm able to calculate MLE fit to the series, calculate expected shortfall of that instrument, then how would I optimise the portfolio? I've read for instance here it is then linear programming problem.

I've tried to calculate ES of each of my instrument and then optimize the objective function weights*ES, but I always get minimum for vector weights 0, which makes sense, that's when its lowest. But that's of course not what I want, what is it that I'm missing? Is it good idea to take code which calculates this for normally distributed returns and just replace the function which calculates the actual ES?

Thanks a lot

• You need a constraint $w^T e = 1$ (see Page 108) to force the sum of the weights to be 1, i.e. to make the "all weights equal zero" solution infeasible. – Alex C Nov 18 '17 at 20:25

## 1 Answer

The ES of the optimized portfolio is (except in trivial cases) not the same as the weighted sum to the ES of the individual instruments; your objective function should be the expected shortfall of the weighted sum of the losses, not the weighted sum of the expected shortfalls of the individual instruments. (So it is an integral over the weighted sum of instrument losses.) This is equation (20) or (21) in the paper you linked. Minimization is facilitated by breaking this into two pieces (shown as equations (22) and (23)) by introducing the auxiliary variables $z_i$.

There are two other constraints. One is the constraint on the sum of the weights (mentioned by a Alex C above); this is equation (25). The other is the constraint that the portfolio delivers a desired level of return, equation (24). The optimization program you want is analogous to equations (22)-(25) in the doc you linked.

It's really a pretty amazing thing that minimizing expected shortfall is numerically feasible. That insight is due to Rockafellar and Uryasev (and these papers are mostly available online link1); but getting from an intuitive description of the problem to the operational form of the programming problem isn't as pretty as you would like! On operationalization, however, I found these slides by Guy Yollin invaluable: http://www.r-programming.org/files/RFinance2009.pdf

• Hi, that looks really good! Thanks for this, I will try to implement it now. – Jan Sila Nov 19 '17 at 10:58
• Do I understand correctly, in the equation 22, z_{j} = (Sum by i X_{ij}*w_{i}-Beta)+ ? Also if I set up the problem as calculating some portfolio weights, for those estimate the distribution function of the weighted observations, and on that calculate the ES of that, would that be ok ? I'm wondering if that's linear in the weights ? – Jan Sila Nov 19 '17 at 17:24
• I think I've got it all working, looks as it all checkout. Thanks for the Yollin slides, mate! :) – Jan Sila Nov 19 '17 at 18:46
• Sorry I didn't get back on your last question; I don't think I got the gist. I'm glad you got something working. I think this is a promising method. Good luck! (Thanks for the bump, too.) – Drew Saunders Nov 21 '17 at 16:11