The floor of the the New York Stock Exchange (NYSE) is seen after the close of trading in New York
The floor of the the New York Stock Exchange (NYSE) is seen after the close of trading in New York

U.S. stocks rose modestly after initially surging Tuesday after new economic data showed inflation may be cooling.

The Dow Jones Industrial Average rose 105.65 points, or 0.31%, to close at 34,110.69. The S&P 500 rose 29.40 points, or 0.74%, to close at 4019.96, and the Nasdaq Composite Index climbed 113.08 points, or 1.01%, to close at 11,256.81.

The Labor Department's consumer price index showed the costs of goods and services rose 7.1% in November compares to November last year. Economists surveyed by Dow Jones expected a 7.3% increase.

The Dow jumped more than 700 points and the Nasdaq gained 3.4% immediately after release of the report.

The CPI is a key indicator used by the Federal Reserve when deciding interest rates. The Fed's two-day policy meeting starts Wednesday and the central bank is expected to raise interest rates 0.50%.

Some stocks that rose Tuesday included Pinterest (PINS), which closed at $26.43, up $2.82, or 11.97%. Meta Platform's (META) price of shares rose $5.44, or 4.74%, to close at $120.15.

"While the inputs of inflation coming into that Fed meeting are modestly better, we still don't know for sure if the Fed's going to raise by 50 basis points, if they're going to raise their terminal rate. So, we have quickly shifted gears into a mode of 'wait and see' for the Fed meeting tomorrow," Art Hogan, chief market strategist at B. Riley Wealth, told CNBC.