U.S. stocks rose, sending benchmark indexes to all-time highs, after the Federal Reserve said it would reduce the pace of its monthly bond purchases and expressed confidence in the labor market recovery.

The Standard & Poor's 500 index advanced 29.65 points or 1.66 percent to 1,810.65, surpassing its previous record close reached Dec. 9. The Dow Jones industrial average surged 292.71 points, or 1.84 percent, to an all-time high of 16,167.97. Both gauges posted their biggest gains in two months.

The Nasdaq composite rose 46.38 points, or 1.15 percent, to 4,070.06.

"With the Fed acknowledging the economy continues to recover, and reiterating low rates and accommodative policy will remain for quite some time, it reinforces the Goldilocks scenario of a Fed backstop, and equities are running with it," said Ryan Larson, the Chicago-based head of U.S. equity trading at RBC Global Asset Management (U.S.).

The central bank announced plans to cut its monthly bond purchases to $75 billion from $85 billion, taking its first step toward unwinding the unprecedented stimulus that Chairman Ben Bernanke put in place to help the economy recover from the worst recession since the 1930s.

Bernanke is scheduled to retire at the end of January. The rally Wednesday erased the S&P 500's monthly loss, leaving the gauge 0.3 percent higher in December.

The equity benchmark gauge has surged 27 percent this year, on course for the biggest annual gain since 1997. Three rounds of monetary stimulus have driven stocks to a rally that lifted the S&P 500 up 168 percent from a 12-year low in 2009.

Health-care and financial stocks each surged 2.4 percent as a group, as all 10 main S&P 500 industries gained at least 0.8 percent. Technology shares added 0.1 percent for the worst performance.

An S&P index of homebuilders rallied 4.2 percent as all 11 members advanced. The Fed's low interest rates have prompted consumers to buy homes or refinance existing mortgages, sparking a recovery in the housing market that was at the center of the financial crisis.

Lennar Corp. climbed 6.3 percent to $37.43. The second- biggest U.S. home-builder by market value reported quarterly earnings that topped estimates as it sold more homes and increased profits.

CVS Caremark Corp. rose 4.3 percent to a record $69.69. The largest supplier of prescription drugs in the United States boosted its dividend by 22 percent and approved a share buyback for as much as $6 billion.