Extreme losses of portfolios with heavy-tailed components are studied in the framework of multivariate regular variation. Asymptotic distributions of extreme portfolio losses are characterized by a functional = (, ) of the tail index , the spectral measure , and the vector of portfolio weights. Existence, uniqueness, and location of the optimal portfolio are analysed and applied to the minimization of risk measures. It is shown that diversification effects are positive