US stocks climbed to claw back some of the losses from their worst week in nearly a year and a half.