Stocks turn higher as crude oil tops $100 a barrel

FILE - In this file photo taken May 12, 2011, specialist Ned Zelles, center, works at his post on the floor of the New York Stock Exchange. Concerns that Europe's debt crisis may be worsening, particularly in Greece, kept stock markets in check Wednesday, May 25, 2011, while soft Japanese economic figures added to the evidence suggesting that the global economic recovery is running out of steam.(AP Photo/Richard Drew, file)
— AP

FILE - In this file photo taken May 12, 2011, specialist Ned Zelles, center, works at his post on the floor of the New York Stock Exchange. Concerns that Europe's debt crisis may be worsening, particularly in Greece, kept stock markets in check Wednesday, May 25, 2011, while soft Japanese economic figures added to the evidence suggesting that the global economic recovery is running out of steam.(AP Photo/Richard Drew, file)
/ AP

The Dow Jones industrial average rose 38.45 points, or 0.3 percent, to close at 12,394.66. The Standard & Poor's 500 index rose 4.19, or 0.3 percent, to 1,320.47. The Nasdaq composite rose 15.22, or 0.6 percent, to 2,761.38.

Markets have been battered in recent days by new worries over Europe's debt crisis. The last time stocks closed higher was Thursday, when investors welcomed a blockbuster initial public offering by the social networking site LinkedIn Corp.

Greece's government and opposition party failed late Tuesday to reach agreement on how to pare the country's debts, adding to the uncertainty surrounding Greece's financial future. Many analysts believe Greece will eventually have to restructure its debt, possibly by extending interest payments or lowering interest rates.

Without that restructuring, Greece might default. That would cause a domino effect, raising borrowing rates for larger European countries and hampering the world economy.

Japan's government reported that the country's exports fell by 12.5 percent in April after the March 11 earthquake and tsunami shuttered factories and forced manufacturers to stop production. Japan's auto shipments were particularly hurt, dropping 67 percent. The report added to concerns that the global economy is a long way from returning to health.

The drop in Japanese exports hit orders for long-lasting goods in the U.S. The Commerce Department said companies ordered fewer computers, heavy machines, cars and airplanes from factories in April. The 3.8 percent drop was the biggest in 6 months, reflecting a decline in U.S. business investment.

Stocks had been on a steady climb since last August until the Japanese catastrophe shook global financial markets in March. Strong corporate earnings sent stocks back up in April, but markets have stalled in the past three weeks. The S&P 500 closed at 1,363 on April 29, its highest level of the year, and has drifted lower ever since.

Some analysts say the market may have been rising too far, too fast since the beginning of the year, making stocks seem expensive. The Dow is still up 7 percent for the year. The S&P 500 is up 5 percent.

American International Group Inc. fell 4 percent to $28.28 as the U.S. Treasury Department sold some of its stake in the company. Treasury said it would sell 300 million AIG shares for $29 each, making a small profit. The price was set late Tuesday at the low end of the government's projected range.

Roughly two shares rose for every one that fell on the New York Stock Exchange. Trading volume was 3.7 billion shares.