NEW YORK (AP) — U.S. stocks are rallying Wednesday as investors make their final moves ahead of a highly anticipated report on inflation, one that could show whether Wall Street’s rising optimism recently has been warranted or overdone.

The S&P 500 was 1.1% higher in afternoon trading and on pace for a second straight gain before Thursday morning’s inflation data. The Dow Jones Industrial Average was up 221 points, or 0.7%, at 33,925, as of 3:15 p.m. Eastern time, and the Nasdaq composite was 1.4% higher.

Stocks have started 2023 with gains on hopes that cooling inflation and a slowing economy may get the Federal Reserve to ease off its sharp hikes to interest rates. Such increases can help stamp out high inflation, but they also slow the economy by design and raise the risk of a recession while hurting prices for stocks and other investments.

Economists expect Thursday’s report to show inflation is continuing to cool from its summertime peak, down to 6.5% last month from 7.1% in November and from more than 9% in June. The hope on Wall Street is that such a trend toward normal could convince the Fed to soon halt its blistering set of rate increases, many of which were at shock-and-awe levels that were triple the usual amount.

Some investors are even betting the Fed will cut interest rates in the second half of this year, to help prop up an economy that’s beginning to show pockets of weakness because of last year’s rate hikes. Cuts to rates typically act like steroids for markets, propping up prices for stocks and other investments.

“One real thing I think underpinning the market is simply the fact that the market doesn’t believe the Fed when they say they’re going to keep hiking this year,” said Brad McMillan, chief investment officer for Commonwealth Financial Network.

Of course, that also means investors could be setting themselves up for disappointment. If Thursday’s data and other reports don’t show inflation is improving as much as expected, it could mean the Fed would have to get tougher on interest rates.

The Fed has already been saying repeatedly that it plans to raise its key overnight interest rate a bit further, past its current perch sitting in a range of 4.25% to 4.50%. That rate began last year at its record low of virtually zero.

The central bank has also insisted it plans to keep rates high for a while to ensure inflation is really beaten down. It does not envision any rate cuts happening this year, and it’s even said that any “unwarranted” rallies on Wall Street “driven by a misperception” would only make the mission of returning inflation to normal more complicated.

Recently, though, Wall Street has been looking through such pronouncements.

If the economy does fall into a modest recession, possible rate cuts could help to support stocks. And hope is growing among investors that the economy could successfully walk the tightrope of slowing enough to snuff out high inflation but not so much as to cause a deep recession.

That’s helped spark a mini-rebound for many of the stocks that fell the most last year, which plunged in large part because of rising rates and fears of inflation.

Facebook’s parent, Meta, is up more than 10% so far in 2023 after slumping 64% in 2022, for example.

Later this week, companies will also begin reporting how much profit they made during the last three months of 2022. That’s key because earnings are one of the main levers that set stock prices, and the reports will also offer a window into how companies are managing the squeeze of inflation.

Bank of America, Delta Air Lines, JPMorgan Chase and UnitedHealth will report results on Friday. Analysts say this could mark the first time S&P 500 earnings per share have dropped from year-ago levels since 2020.

Markets in Asia were mixed overnight and markets in Europe rose.