Stocks staged a comeback after last week’s tumult.