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. stocks indexes ended the week down about 1 percent and they remain down more than 8 percent 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 percent, to 15,973.84. The Standard & Poor's 500 gained 35.70 points, or 2 percent, to 1,864.78. The Nasdaq composite added 70.67 points, or 1.7 percent, 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 percent Friday. But the downbeat trend in the U.S. 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 percent, to close at $29.44 a barrel in New York. Brent crude, a benchmark for international oils, gained $3.30, or 11 percent, to $33.36 a barrel in London.
The oil rebound sent the S&P 500's energy companies 2.6 percent higher. Marathon Oil was the best performer in the sector, rising 48 cents, or 6.8 percent, 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 market's 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 percent Friday.
JP Morgan Chase climbed $4.42, or 8.3 percent, to $57.49, while Citigroup added $2.56, or 7.3 percent, to $37.54. Bank of America rose 79 cents, or 7.1 percent, to $11.95. Meanwhile, Deutsche Bank AG surged 12.1 percent after the bank offered to buy back more than $5 billion in bonds in a display of financial strength. The stock gained $1.87 to $17.38.
Traders also welcomed a report from the Commerce Department indicating a modest gain in retail sales last month. The data, which came in ahead of expectations, suggested that consumers 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 percent after the casino operator reported better-than-expected quarterly results Thursday. The stock gained $9.45 to $69.14.
Groupon vaulted 29 percent after the online daily deal service's latest quarterly profit and revenue topped Wall Street estimates. The stock added 65 cents to $2.89.
Some companies didn't fare as well, however.
Activision Blizzard slid 7.9 percent 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 $28.12.
Pandora Media slumped 12 percent 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 to $8.
In Europe, Germany's DAX was up 2.5 percent, while France's CAC 40 was up 2.5 percent. Britain's FTSE 100 rose 3.1 percent.
In Asia, Japan's main stock index fell sharply, leading other Asian markets lower. Tokyo's Nikkei 225 plunged 4.8 percent after earlier sinking as much as 5.3 percent. Hong Kong's Hang Seng fell 1.2 percent. South Korea's Kospi gave up 1.4 percent and Australia's S&P/ASX 200 fell 1.2 percent. 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 on Monday.
A day after surging 4.5 percent, gold fell $8.40, or 0.7 percent, 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 percent, to $2.03 a pound.
In other energy trading in New York, wholesale gasoline jumped 10 cents, or 10.8 percent, to close at $1.04 a gallon, while home heating oil climbed 9 cents, or 9.2 percent, to close at $1.07 a gallon. Natural gas fell 3 cents, or 1.4 percent, to $1.97 per 1,000 cubic feet.
Bond prices fell. The yield on the 10-year Treasury rose to 1.74 percent from 1.66 percent late Thursday.
In currency markets, the dollar rose to 113.26 yen from 112.27, while the euro fell to $1.1255 from $1.1330.