The S&P 500 gained 5.5% in July—despite a historically bad U.S. economic downturn | Fortune