While the continuation of the stimulus program helps stock investors, the Fed's apparent change of heart sowed confusion that is likely to last far beyond Wednesday in markets around the world. Many on Wall Street were left wondering how they got it so wrong, with several pointing an accusing finger at Mr. Bernanke, the Fed chairman, and the central bank's communication strategy.
For his part, Mr. Bernanke appeared to put some of the blame on Wall Street.
"The Fed and the market have not been on the same page, and that's very apparent in what happened at 2:01 p.m.," said Michael Hanson, senior United States economist at Bank of America, and one of the few strategists to have predicted that the Fed would stand pat on its bond buying.
Since May, when Mr. Bernanke first signaled that the Fed could start to wind down its efforts to stimulate borrowing and the economic growth, Wall Street has been preoccupied with predicting when and by what degree that would happen. At its June meeting, Fed policy makers said that the economy was nearly strong enough to begin doing without the full force of the stimulus program.
More from The New York Times:
In Surprise, Fed Decides to Maintain Pace of Stimulus
Breathing Room for Emerging Markets Watching Money Flee
America'sSinking Middle Class
As a result, investors around the world spent much of the summer adjusting to the idea that the Fed would begin a retreat from its monthly buying of $85 billion in Treasurys and mortgage-backed securities.
Figuring out what would come next involved navigating in uncharted territory: The breadth and scale of the steps taken by the central bank to get the economy back on its feet in the wake of the financial crisis have been without precedent. The bond-buying programs have helped push up stock prices and kept interest rates low, making it easier for borrowers to take out home and auto loans.
The expectation that those programs would soon start to ease has caused interest rates to rise, which has hurt many emerging market economies that had come to rely on lower rates.
The recent preparations paved the way for the mixture of confusion and euphoria that broke out on Wednesday afternoon.
"In one line: Delay is good policy, the communications strategy is in pieces," Ian Shepherdson, chief economist of Pantheon Macroeconomics, wrote in a note on Wednesday.
(Read more: No taper! Did Bernanke fool the Street?)
The Standard & Poor's 500-stock index jumped 20.76 points, or 1.2 percent, to close at 1,725.52. The Dow Jones Industrial Average rose 147.21 points, or nearly 1 percent, to 15,676.94. Both indexes reached record nominal closing highs.
The Nasdaq composite index gained 37.94 points, or 1 percent, to 3,783.64, its highest close since late September 2000, when the dot-com boom was fading.
Movements in the bond markets were much more extreme. The price of the Treasury's 10-year note jumped 1 11/32, to 98 11/32, while its yield dropped to 2.69 percent, from 2.85 percent late Tuesday.
Investors also bought mortgage bonds, paving the way for a reversal in the recent rise in mortgage rates. This helped bolster the shares of home builders like KB Home, which soared 8.2 percent, and DR Horton, up 6.9 percent.
Gold prices rose more than 4 percent.
On Wednesday, Mr. Bernanke still suggested that a pullback could begin later this year, but he said that Fed officials had determined that the economy was not on strong enough footing to begin adjusting its stimulus programs this month.
In his news conference after the Fed's statement, Mr. Bernanke appeared to acknowledge that the central bank had gone against the expectations of the market. Mr. Bernanke said that part of the problem was the sheer complexity of the stimulus programs, which made it hard to predict future policy.
"We are dealing with tools that are less familiar and harder to communicate about," he said.
But Mr. Bernanke suggested that some investors were not paying sufficient attention, pointing to his past promises not to change policy until economic data, and particularly unemployment numbers, showed significant improvement.
"Asset purchases are not on a preset course," he said with audible frustration. "They've always been conditional on the data."
On Wall Street, there were many competing theories about why the Fed had defied expectations.
Michael Gapen, the chief United States economist at Barclays, said on Wednesday that he believed the Fed had purposely misled investors to push up interest rates and knock out speculation in risky financial products.