Summer stock rally relieved this year’s most painful trades.