U.S. stocks ended a down week on a high note Friday, snapping a five-day losing streak on the strength of energy and financial companies.
A sharp rebound in oil prices and an encouraging report on retail sales helped lift the stock market to its first gain since late last week.
Despite the rally, the major U.S. stock indexes ended the week down about 1%, and they remain down more than 8% for the year.
"It's a relief to see after several very ugly days in a row, but I wouldn't hang my hat on it and say the worst is over," said Rob Eschweiler, global investment specialist at J.P. Morgan.
The Dow Jones industrial average rose 313.66 points, or 2%, to 15,973.84 on Friday. The Standard & Poor's 500 index climbed 35.70 points, or 2%, to 1,864.78. The Nasdaq composite went up 70.67 points, or 1.7%, to 4,337.51.
Global stocks have been in a slump since the beginning of the year on concerns that growth in China, which has been the engine of the global economy in recent years, is slowing far faster than expected. Plunging oil prices and low inflation have added to the market's jitters that the global economy is sputtering.
Those worries also helped drive the stock market lower in recent days, and continued to batter stocks in Asia. Japan's main stock index lost nearly 5% on Friday. But the downbeat trend in the United States snapped as investors were encouraged by retail sales and a rally in European stocks.
A surge in oil prices helped put investors in a buying mood early on. A day after sinking to its lowest level since May 2003, benchmark U.S. crude climbed $3.23, or 12.3%, to close at $29.44 a barrel in New York. Brent crude, a benchmark for international oils, rose $3.30, or 11%, to $33.36 a barrel in London.
The oil rebound sent the S&P 500's energy companies 2.6% higher. Marathon Oil was the best performer in the sector, rising 48 cents, or 6.8%, to $7.49.
"Oil, which has been one of the most fickle, most volatile series that everybody's watching, is having a nice day," said Tim Dreiling, regional investment director for the Private Client Reserve of U.S. Bank. "Europe is continuing to look good. And it looked like [the market] was oversold."
Financial shares led the advance. The sector is the worst-performing part of the market this year because investors expect that low interest rates around the world will sap bank profits, but it rallied 4% Friday.
JP Morgan Chase jumped $4.42, or 8.3%, to $57.49, while Citigroup rose $2.56, or 7.3%, to $37.54. Bank of America climbed 79 cents, or 7.1%, to $11.95. Meanwhile, Deutsche Bank AG surged 12.1% after the bank offered to buy back more than $5 billion in bonds in a display of financial strength. The stock rose $1.87 to close at $17.38.
Traders also welcomed a report from the Commerce Department indicating a modest gain in retail sales last month. The data, which exceeded expectations, suggested that people kept shopping despite sharp drops in stock prices.
The positive sales report and recent jobs data showing a pickup in wage growth suggest the economy is holding up better than Wall Street thinks, Eschweiler said.
"It solidifies our view that the markets are pricing in a significantly higher probability of recession than what we think the fundamentals currently dictate," he said.
Encouraging quarterly results from some companies also helped lift the market.
Wynn Resorts surged 15.8% after the casino operator reported better-than-expected quarterly results Thursday. The stock gained $9.45 to close at $69.14.
Groupon vaulted 29% after the online daily deal service's latest quarterly profit and revenue topped Wall Street estimates. The stock added 65 cents, closing at $2.89.
Some companies didn't fare as well, however.
Activision Blizzard slid 7.9% after the video game company reported weaker-than-anticipated quarterly revenue Thursday. The stock was one of the biggest decliners in the S&P 500 index, losing $2.40 to close at $28.12.
Pandora Media slumped 12% after the Internet radio company's fourth-quarter profit fell short of estimates and the company didn't comment on rumors that it's looking to sell itself. The stock lost $1.09, closing at $8.
In Europe, Germany's DAX was up 2.5%, and France's CAC 40 was up 2.5%. Britain's FTSE 100 rose 3.1%.
In Asia, Japan's main stock index fell sharply, leading other Asian markets lower. Tokyo's Nikkei 225 plunged 4.8%. Hong Kong's Hang Seng fell 1.2%. South Korea's Kospi gave up 1.4%. Australia's S&P/ASX 200 fell 1.2%. Shares in New Zealand and Southeast Asia also fell. Markets in China and Taiwan were closed all week for Lunar New Year holidays and will reopen Monday.
A day after surging 4.5%, gold fell $8.40, or 0.7%, to $1,239.40 an ounce. Silver was flat at $15.79 an ounce. Copper, an industrial metal that will often rise and fall along with investor's optimism about the global economy, rose 2 cents, or 1.1%, to $2.03 a pound.
In other energy trading in New York, wholesale gasoline jumped 10 cents, or 10.8%, to close at $1.04 a gallon, and home heating oil climbed 9 cents, or 9.2%, to close at $1.07 a gallon. Natural gas fell 3 cents, or 1.4%, to $1.97 per 1,000 cubic feet.
Bond prices fell. The yield on the 10-year Treasury rose to 1.74% from 1.66% late Thursday.
In currency markets, the dollar rose to 113.26 yen from 112.27, and the euro fell to $1.1255 from $1.1330.