Stocks rallied for a second day on Wednesday as investors bought beaten-down financial shares and unloaded gold, but tech stocks could fall on Thursday after late news about Apple's Steve Jobs stepping down as CEO.

In a stunning development after the closing bell, Jobs -- a Silicon Valley legend who co-founded Apple Inc in a garage -- resigned as chief executive of the technology powerhouse. Jobs, 55, is a pancreatic cancer survivor who has been on medical leave for an undisclosed condition since January 17. Apple said Jobs has been elected chairman and Tim Cook has been elected CEO.

Apple's stock, which was halted after hours, resumed trading at 6:55 p.m. and slid 7 percent. In regular trading, Apple gained 0.7 percent to end at $376.18.

Nasdaq 100 futures were hit hardest, losing 21.5 points, or 1 percent, to 2,117.50 after the news. Apple has the biggest effect on the Nasdaq 100's daily moves, as it accounted for more than 14 percent of the index at the end of trading on Wednesday, according to Reuters data.

S&P futures fell 3.8 points. Apple is the second-largest component in the S&P 500, when ranked by market capitalization, where it is second only to Exxon Mobil.

In May, Nasdaq OMX Group Inc cut Apple's weighting in the index to 12.3 percent from 20.5 percent as part of a rebalancing to better reflect the market cap of the biggest Nasdaq issues. Since then, however, Apple has continued to rise. At the end of Wednesday trading, Apple had a market cap of nearly $349 billion.

Analysts' opinions of the implications for Apple's future were mixed. Ashok Kumar of Rodman & Renshaw said it is not a good sign for Jobs to step down ahead of the highly anticipated release of the iPhone 5, while Jeffrey Fidacaro of Susquehanna Financial Group called it a prudent move to name Cook as Jobs' successor, adding that it's nice to get a succession plan in place with Steve Jobs still at the helm of the board.

SWING TIME

During the regular session, the stock market swung back and forth as investors anticipated a key speech from Federal Reserve Chairman Ben Bernanke on Friday. There had been hope the Fed chief would hint of stimulus to aid the struggling economy, but a more likely outcome is for gradual measures.

Some investors have been buying because it feels, looks like perhaps we've seen the lows of the correction, said Hugh Johnson, chief investment officer of Hugh Johnson Advisors LLC in Albany, New York.

(But) savvy investors don't expect QE3. They do not expect the Federal Reserve to unveil anything significant.

The Dow Jones industrial average shot up 143.95 points, or 1.29 percent, to end at 11,320.71. The Standard & Poor's 500 Index jumped 15.25 points, or 1.31 percent, to finish at 1,177.60. The Nasdaq Composite Index gained 21.63 points, or 0.88 percent, to close at 2,467.69.

The S&P has risen for three straight sessions.

Bank of America Corp rose 11 percent to $6.99, reversing losses on Tuesday when the Dow component hit a 2-1/2-year low on fears it may have to raise large amounts of capital. BofA shares are still down more than 30 percent so far this month.

The S&P financials index advanced 2.8 percent, with JPMorgan Chase & Co shares up 3 percent at $35.83.

Traditional value stocks such as CVS Caremark and Time Warner were among the day's top gainers. CVS shares rose 3.1 percent to $34.44 and Time Warner gained 3.3 percent to $29.84.

Bernanke is due to address central bankers at an annual symposium in Jackson Hole, Wyoming, on Friday. His speech last year laid the groundwork for the Fed's unprecedented $600 billion bond-buying program, known as quantitative easing, or

QE2, to revive a sputtering U.S. economy.

The CBOE Volatility Index or VIX, Wall Street's fear gauge, fell but remained at high levels, and investors preferred buying traditional value stocks, suggesting there was caution in the market.

The VIX fell 1 percent to close at 35.90. The gauge generally moves inversely to the stock market as it tracks the price investors pay for protective options on the S&P 500 index.

END OF A GOLDEN AFFAIR

Exchange-traded funds tracking gold stocks and gold-mining stocks fell after U.S. gold futures for December dropped more than 5 percent, sliding $104 to end at $1,757.30 an ounce in the steepest percentage drop since December 2008 during the financial crisis. On a price basis, it was the biggest decline in the continuous front-month gold futures contract since January 22, 1980, when it fell nearly $150.

The SPDR Gold Trust Index declined 3.4 percent to 171.63, while the Market Vectors Gold Miners Index fell 2.5 percent to 59.96.

Barrick Gold shares dropped 3.4 percent to $48.99 and Goldcorp Inc shares fell 3.6 percent to $49.44.

Sectors that led Tuesday's rally, such as energy and technology, shed gains. Growth stocks such as Nvidia fell 1.4 percent to $13.04 and Netflix dropped 1.6 percent to $216.03.

Earlier, the government reported that orders for durable goods, which are long-lasting U.S. manufactured goods, surged in July, rising twice as much as economists had forecast.

About 8.21 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, slightly lower than last year's daily average of about 8.47 billion.

On the NYSE, advancers beat decliners by a ratio of more than 2 to 1. On the Nasdaq, advancers also beat decliners by 1,689 to 853.

(Reporting by Angela Moon; Additional reporting by David Gaffen, Liana Baker, Yinka Adegoke, Alistair Barr and Nichola Groom; Editing by Jan Paschal and Kenneth Barry)