The Basel Committee advocates the use of Expected Shortfall (ES) as the new regulatory risk measure. This talk will briefly review the history of risk measures appearing in the subsequent generations of international banking regulation, their relative merits and shortcomings, with special emphasis on ES. When these measures are used to predict the out-of-sample risk or to optimize portfolios they all display a weakness due to the relative scarcity of data compared to the size of institutional portfolios. The resulting estimation errors can be very large, in fact, for some critical values of the parameters they can diverge, with the optimization algorithm undergoing a phase transition. The estimation error problem is particularly serious for downside risk measures, such as ES. Regularization, borrowed from statistical learning theory, offers a remedy.