NEW YORK (CNNMoney) -- U.S. stocks struggled to hold gains as global economic fears continue to hang over the market.
The Dow Jones industrial average gained 58 points, or 0.5%, at midday The S&P 500 added 4 points, or 0.3%, and the Nasdaq Composite edged up 7 points, or 0.3%.
Hewlett-Packard was the strongest performer on the Dow, with shares rising 4%.HP's stock plunged 20% on Friday amid concerns about the company's turnaround plan.
Shares of big financial institutions were among the biggest decliners on the blue-chip index. Bank of America sank 6%, near its 52-week low, and JPMorgan slid 2%.
Stocks had a solid open following a rebound in European markets. But the advance lost steam as investors struggled to move past concerns about the U.S. economy sliding back into recession and ongoing worries about the European debt crisis.
Those fears have weighed on the market for weeks. 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.
"We are concerned about the slowing that's going on overseas, which presents a longer term drag," said Bruce McCain, chief investment strategist at Key Private Bank. "But at the same time, we're looking for the potential of somewhat better GDP growth."
McCain said business and consumer confidence may not be as weak as many investors had feared.
Meanwhile, investors are also looking ahead to Friday, when Federal Reserve Chairman Ben Bernanke will give his keynote speech at the Kansas City Fed's annual retreat in Jackson Hole, Wyo.
"The Fed's annual gathering in Jackson Hole this year presents yet another opportunity to calibrate Chairman Bernanke's thoughts on the forces of structural weakness in the economy and the appropriate Fed policy stance over the medium term," said Marc Chandler, global head of currency strategy at Brown Brothers Harriman.
At last year's annual meeting, the Fed chief prepared the market for QE2, a policy that is widely credited for supporting stocks earlier this year.
"The legacy of last year's Jackson Hole speech means the markets will be keen to get a signal of further easing," Chandler said. "Some have already gone ahead to extrapolate the FOMC's commitment to hold rates steady at ultra-low levels past next year's elections and into mid-2013 as a form of QE."
Investors also gained some hope as rebel forces swept the Libyan capital of Tripoli, poised to topple Moammar Gadhafi's 42-year rule following six months of civil war.
Currencies and commodities: The dollar slipped against the euro, British pound and the Japanese yen.
Oil for October delivery gained 74 cents to $83 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 $41.20 to $1,893.40 an ounce. Earlier, gold futures hit an intraday high of $1,898.60 an ounce.
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%.
Asian markets ended mixed. The Shanghai Composite lost 0.7%, the Hang Seng in Hong Kong gained 0.5%, and Japan's Nikkei shed 1%.
™ & © document.write((new Date()).getFullYear()); 2011 Cable News Network, Inc., a Time Warner Company. All rights reserved.