We show how to identify the portfolios that cause problems in standard mean-variance optimization (MVO) and develop an enhanced portfolio optimization (EPO) method that addresses the problems. The EPO solution encompasses existing methods such as standard MVO, reverse-MVO, a Bayesian estimator, Black-Litterman, robust optimization, a form of generalized ridge regression used in machine learning, and random matrix theory. Nevertheless, the closed-form EPO is extremely simple. Applying EPO on several realistic datasets, we find significant gains relative to standard benchmarks. In equities, EPO significantly outperforms the market, the 1/N portfolio, and standard asset pricing factors. Similarly in global asset allocation, EPO delivers economically significant increases in the Sharpe ratio and statistically significant alpha to standard time series momentum strategies and other benchmarks.