NEW YORK (AP) -- Stocks managed to notch a modest gain Thursday, with Wall Street cautious ahead of Friday's jobs report but hopeful that the global financial system is on the mend.
Federal Reserve Chairman Ben Bernanke told Congress Thursday the Fed expects to recover most, if not all, the $29 billion worth of loans it made to keep struggling Bear Stearns Cos. from collapse. Bernanke's remarks, in which he defended the central bank's decision to aid JPMorgan Chase & Co.'s buy of Bear Stearns, were calming to investors hoping that demand is returning to the tight credit markets.
John Thain, the chief executive of Merrill Lynch & Co., also lent some solace to the market after telling Japanese financial newspaper The Nikkei that the investment bank has sufficient cash and will not need to raise more.
The stock market has been performing well recently due to its newfound confidence about global financial system - even in the face of poor economic data. Early Thursday, stocks dipped after the Labor Department reported a spike in jobless claims to a level not seen since September 2005.
But the decline was very mild and short-lived - particularly given the huge advance Wall Street logged Tuesday and has mostly maintained, and the fact that economists expect the government on Friday to report there was a jobs loss in March for the third straight month.
"I think that the desire to sell is coming off," said Thomas J. Lee, equities analyst at JPMorgan. The fact that the market has not been shaken by recent disappointing economic data "tells me that the recession is largely discounted."
According to preliminary calculations, the Dow Jones industrial average rose 20.20, or 0.16 percent, to 12,626.03.
Broader stock indicators also edged higher. The Standard & Poor's 500 index rose 1.78, or 0.13 percent, to 1,369.31, and the Nasdaq composite index rose 1.90, or 0.08 percent, to 2,363.30.
The Dow, which shot up nearly 400 points on Tuesday, is up 7.6 percent from its March 10 low, its worst level since October 2006.
"I think we're going to have a big test coming up," Lee said. "Are U.S. stocks poised for another downturn, or are U.S. stocks telling us the worst is behind us?"
With a broad swath of corporate earnings reports set to arrive in the coming weeks, investors appear upbeat. Over the past few weeks, the market has occasionally been knocked lower by disappointing economic readings, particularly on consumers' discretionary spending, but it has ultimately righted itself amid signs that the credit markets are improving.
"You're going to continue to see weak economic data. That doesn't mean stocks are going to come down," said Bill Stone, chief investment strategist for PNC Wealth Management.
Government bonds rose slightly. The yield on the 10-year Treasury note, which moves opposite its price, was at 3.58 percent, down from 3.60 percent late Wednesday.
Crude oil fell $1 to $103.83 a barrel on the New York Mercantile Exchange, after a surge a day earlier on the prospect of climbing demand for gasoline.
The dollar was mixed against other major currencies, while gold rebounded back above $900 an ounce.
The Russell 2000 index of smaller companies rose 1.30, or 0.18 percent, to 713.57.
Advancing issues outnumbered decliners by about 3 to 2 on the New York Stock Exchange, where volume came to 1.25 billion shares.
JPMorgan rose 9 cents to $46.28 and Bear Stearns fell 14 cents to $10.72 after each company's chief executive spoke to Congress following Bernanke's testimony. JPMorgan's CEO James Dimon said the bank has borrowed $25 billion so far from the Fed, which last week saw an average $32.9 billion in daily borrowing from financial firms.
In addition to the congressional testimony, investors got a bit of relief from the Institute for Supply Management. The ISM said Thursday the services sector contracted only slightly in March - a stronger performance than in February, and a better reading than many economists predicted.
In corporate news, Schering-Plough Corp. announced late Wednesday it plans to cut jobs to offset continued sales declines of its cholesterol drug Vytorin. Schering-Plough shares soared $1.52, or 11 percent, to $15.38; they had fallen sharply earlier in the week after news that medical researchers were recommending against use of the drug.
Cisco Systems Inc., meanwhile, dropped 73 cents, or 2.9 percent, to $24.23 due to an analyst downgrade. The analyst cited softening demand, and said the networking equipment maker will have to buy other companies to reach its growth target.
In overseas trading, Tokyo's Nikkei index closed 1.52 percent higher, while London's FTSE fell 0.42 percent, Frankfurt's DAX lost 0.53 percent and Paris' CAC 40 slid 0.49 percent.