Stocks rose in volatile trading on Friday as investors shook off a revenue warning from technology bellwether Intel and a downbeat economic assessment by Federal Reserve Chairman Ben Bernanke to snap up bargains.

Major indices fell sharply after Bernanke's comments and Intel's warning, which came within minutes of each other.

The decline took the S&P 500 index to 1,040, a key technical level that has consistently brought in buyers in the past year.

The testing of 1,040 and a better-than-expected reading on second-quarter gross domestic product triggered buying by short sellers, who covered their positions that profited from recent weakness in housing and manufacturing earlier in the week.

The economic news, while not great, was better than expected, said Fred Dickson, chief market strategist at D.A. Davidson & Co in Lake Oswego, Oregon. He said net short market participants probably decided to cover some of their positions in light of the data.

The bounce off 1,040 may be a contributing factor, he said.

Despite Intel Corp's negative news, its shares were up 1.3 percent at $18.42 after falling earlier in the day to their lowest level since July 2009. Shares are down 15 percent in the last five weeks.

Even though the news is bad, the bad news is already in the valuation. Obviously business isn't going great there, but the stock is so cheap this doesn't matter, said Stephen Massocca, managing director at Wedbush Morgan in San Francisco.

The Dow Jones industrial average <.DJI> gained 100.85 points, or 1.01 percent, to 10,086.66. The Standard & Poor's 500 Index <.SPX> rose 10.09 points, or 0.96 percent, to 1,057.31. The Nasdaq Composite Index <.IXIC> added 17.94 points, or 0.85 percent, to 2,136.63.

Bernanke told central bankers at a conference in Jackson Hole, Wyoming, the recovery has weakened more than expected and the central bank was ready to take further steps if needed to spur the recovery.

3PAR Inc

surged 24 percent to $32.29 after Hewlett-Packard Co again raised its buyout offer for the data storage company, leapfrogging a bid from Dell Inc . HP, a Dow component, fell 1.7 percent to $37.58, while Dell rose 2.6 percent to $12.06.

(Reporting by Rodrigo Campos; Additional reporting by Chuck Mikolajczak; Editing by Kenneth Barry)