U.S. stocks ended the week not with a bang but a whimper.

The market steadied, with major indexes notching gains for the week in a subdued end to one of the most volatile periods in years for global markets.

Friday’s trading was relatively calm compared with the huge swings in recent days, but jitters continued to percolate below the surface....