Updated from 4:13 p.m. EST

Stocks had yet another back-and-forth session before closing higher Thursday amid rumors that a takeover could be close for embattled lender Countrywide Financial ( CFC) and suggestions from the Federal Reserve chairman that the central bank might ease again.

The Dow Jones Industrial Average swung in a range of 267 points and went out up 117.78 points, or 0.92%, at 12,853.09. The S&P 500 gained 11.20 points, or 0.79%, to 1420.33. The Nasdaq Composite advanced 13.97 points, or 0.56%, to 2488.52.

Over the last two sessions, the Dow has added 2.1%, and the S&P 500 is up 2.2%. The Nasdaq has risen 2%, but is still lower for the week after a sharp decline Tuesday.

The major averages were lifted in the afternoon following a report in The Wall Street Journal said that Bank of America ( BAC) is in advanced talks to acquire Countrywide. Shares of the lender surged 51.4% to end at $7.75.

"Obviously, this potential deal means that other lenders could be taken out, and that will bring more stability to the financial sector," said Robert Pavlik, chief investment officer with Oaktree Asset Management. "Having much more capital will no doubt lessen the chances of further deterioration, and these finance names might be able to weather the storm."

Subsector indices measuring financial stocks reflected the news. The NYSE Financial Sector Index was up 1.5%, while the Amex Securities Broker/Dealer Index jumped 3.7%.

Volume was again strong and breadth was positive. On the New York Stock Exchange 5.06 billion shares changed hands, as advancers topped decliners by a 12-to-5 margin. Volume on the Nasdaq reached 2.55 billion shares, with winners beating losers 3 to 2.

Earlier, stocks overcame initial weakness after Bernanke said additional rate cuts "may well be necessary" based on recent soft economic data and a downturn in the housing and credit markets.

"The Federal Open Market Committee will, of course, be carefully evaluating incoming information bearing on the economic outlook," added Bernanke. "Based on that evaluation, and consistent with our dual mandate, we stand ready to take substantive additional action as needed to support growth and to provide adequate insurance against downside risks."

The FOMC, the central bank's policymaking arm, will next convene for a two-day meeting on Jan. 29.

"While the Fed highlighted increased downside risks for the economy, this more negative outlook is currently taking a backseat to the potential for a 50-basis-point rate cut by the Fed later this month and more stimulative action by the central bank," said Michael Sheldon, chief market strategist with Spencer Clarke LLC.

Ian Shepherdson, chief economist with High Frequency Economics, said that the Fed has now reached the point where it is more worried about rising unemployment than inflation risks.

" Bernanke warned of inflation risks, but that was not his core story," said Shepherdson. "Instead, he focused on the severity of the housing crunch and said banks have become more restrictive in their lending, so further eases may well be necessary."

Before the opening bell, the Bank of England decided to keep its key interest rate steady at 5.50%, one month after cutting by 25 basis points. The European Central Bank also elected to hold borrowing rates steady, at 4%.

European stocks edged lower following the policy announcement. London's FTSE 100 was down 0.6%, and Germany's Xetra Dax dipped 0.9%.

Among other corporate news, Capital One ( COF) became the latest financial name to slash its earnings forecast. The company now expects 2007 earnings of $3.97 a share, down from the old forecast of nearly $5. Capital One also raised its expectations for charge-offs in 2008 due to a weaker economy. Shares finished down 1% at $42.92.

Freddie Mac ( FRE), was a drag earlier on word that Moody's might cut its financial strength rating on the mortgage buyer. However, Freddie Mac climbed 2.7% to close at $27.88.

Citigroup ( C) added 2.3% and Merrill Lynch ( MER) 3.1% following a Wall Street Journal report that the two are in talks to raise more capital from overseas governments in an effort to offset losses due to the credit crunch.

Investors also pored over a slew of retail same-store sales for December, which indicated a dismal performance during the holiday shopping season.

Apparel retailers were hit hard last month, as Limited Brands ( LTD), Chico's FAS ( CHS) and AnnTaylor ( ANN) posted larger-than-anticipated declines in sales for December.

Department stores also had a weak month. Macy's ( M) reported a worse-than-expected 7.9% decline in same-store sales, while J.C. Penney ( JCP) and Saks ( SKS) posted decreases that were in line with expectations.

Wal-Mart ( WMT) was one of few bright spots. The world's largest retailer said comp sales rose 2.4%, beating Wall Street's forecast of a 1.8% rise. Rival Target ( TGT) posted a 5% slide in same-store sales last month.

Wal-Mart closed up $1.50, or 3.2%, to $48.40. Target overcame its sales decline and was higher by $1.63, or 3.3%, at $51.55.

Following Wednesday's close, Men's Wearhouse ( MW), American Eagle ( AEO) and Hot Topic ( HOTT) cut their guidance.

Despite the mostly weak retail reports, the S&P Retail Index was higher by 0.7%.

Also after the previous session, Dow component Alcoa ( AA) kicked off the fourth-quarter earnings reporting season by exceeding the Thomson First Call average consensus for both profit and revenue. Shares tacked on 19 cents, or 0.6%, at $31.44.

Away from equities, U.S. Treasury prices were dropping, with the 10-year note easing 15/32 in price and yielding 3.88%. The 30-year bond was down 1-20/32, yielding 4.43%.

The only notable economic release of the day came from the Labor Department, who said weekly jobless claims fell by 15,000 last week to 322,000. The less volatile four-week moving average declined by 3,000 claims to 341,000.

Oil prices were dropping, with crude down $1.96 to close at $93.71 a barrel. Gold futures reached all-time highs, adding $11.90 to close at $893.60 an ounce.

With the decline in crude, transports were posting gains and were one of the few bright spots. The Amex Airline Index was up 12%, and the Dow Jones Transportation Average was higher by 2.7%.

A gain of 18.2% in Delta Air Lines ( DAL), driven by merger rumors, was one of the top individual stocks.

If you liked this article you might like

Paradigm Opportunity Protects Investors in Tough Times

Paradigm Opportunity Protects Investors in Tough Times

5 Things You Need to Know Before the Stock Market Opens (Correct)

5 Things You Need to Know Before the Stock Market Opens (Correct)

U.S. Investors Brace for a Third Bailout in Greece

U.S. Investors Brace for a Third Bailout in Greece

5 Things You Need to Know Before the Stock Market Opens

5 Things You Need to Know Before the Stock Market Opens

40 Hedge Funds' Best Stocks Show the Way for 2012 (Update 1)

40 Hedge Funds' Best Stocks Show the Way for 2012 (Update 1)