NEW YORK (CNNMoney) -- U.S. stocks rose modestly Monday as investors grappled with an uncertain economic outlook ahead of a key speech by Fed chairman Ben Bernanke.
The advance came on a day with no major economic reports or major corporate developments. As a result, stocks traded in a wide range as investors anticipated events later in the week.
But the gains were a welcome change of pace after the extreme volatility of the last few weeks. Investors have been rattled by a spate of gloomy economic news and signs the debt crisis in Europe is not going away anytime soon.
"The market is in the process of testing for a bottom," said Bruce McCain, chief investment strategist at Key Private Bank.
The Dow Jones industrial average () gained 37 points, or 0.3%, to 10,854. The S&P 500 ( ) ended little changed at 1,124. The Nasdaq Composite ( ) edged up 3 points, or 0.1%, to 2,345.
McCain said investors remain concerned about the debt problems in Europe, where policymakers have yet to propose a long-term solution. But he said business and consumer confidence in the United States may not be a weak as many investors had feared.
Investors are also looking ahead to Friday, when Bernanke will give his keynote speech at the Kansas City Fed's annual retreat in Jackson Hole, Wyo.
At last year's annual meeting, the Fed chief prepared the market for QE2, a bond-buying program that is widely credited for supporting stocks earlier this year.
Now, investors are eager to hear what Bernanke has to say about the flagging U.S. economy. But there are questions about how far the Fed can go to stimulate growth, with trillions of dollars on its balance sheet and interest rates expected to remain low for the next two years.
"There's always something they can do," said Art Hogan, a managing director at Lazard Capital Markets. "QE is one thing, but there are other weapons in the war chest," he said.
He said Bernanke's statement will probably not be as "ambitious" as it was last year, though the chairman may hint at more modest proposals, such as lowering excess reserve requirements for banks under its purview.
Meanwhile, shares of oil companies Exxon (Fortune 500) and Chevron ( , Fortune 500) were in focus as rebel forces swept the Libyan capital of Tripoli, poised to topple Moammar Gadhafi's 42-year rule following six months of civil war. (CNN: Libya on the brink),
On Friday, U.S. stocks capped a difficult week, with the S&P 500 posting its biggest four-week drop since March 2009. The Dow, S&P 500 and Nasdaq fell between 4% and 6% last week.
Oil for October delivery gained $1.84 to $84.10 a barrel. Meanwhile, Brent crude, the European benchmark, fell $1.10, or almost 1% to $107.52 a barrel, amid hopes that Libyan oil production may soon resume.
Gold futures for December delivery rose $35 to $1,887.80 an ounce. The precious metal rose above a record $1,900 an ounce in electronic trading later Monday.
Bonds: The price on the benchmark 10-year U.S. Treasury fell, pushing the yield up to 2.09% from 2.07% late Monday.
World markets: European stocks closed off session highs. Britain's FTSE ( ) 100 rose 1%, France's CAC ( ) 40 gained 1.2%, But the DAX ( ) in Germany eased 0.1%.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.96%||3.98%|
|15 yr fixed||3.07%||3.09%|
|30 yr refi||3.96%||4.07%|
|15 yr refi||3.08%||3.17%|
Today's featured rates: