Stocks clawed back some of the ground they lost in a two-day rout but still suffered their biggest weekly loss in six months.

Even with Friday's moderate gains, major U.S. indexes lost about 4% for the week. A recent spike in interest rates has spooked investors who fear higher borrowing costs could slow down the economy.

Longtime market favorites like Amazon and Apple came roaring back with gains of about 4% each.

Several major banks including PNC Financial fell, however, and small-company stocks lagged far behind the rest of the market.

The S&P 500 index rose 38 points, or 1.4%, to 2,767.

The Dow Jones Industrial Average rose 287 points, or 1.1%, to 25,339. The Nasdaq tech-heavy composite rose 167 points, or 2.3%, to 7,496.

(Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)