NEW YORK, May 14 (Reuters) - Investors’ newfound optimism on the U.S. economy faces an important test on Wednesday, with consumer price data set to show whether the soft landing hopes that have fueled recent gains in equities are justified.

Investors’ resurgent appetite for equities has driven the S&P 500 back near record highs. Meanwhile, eye-popping rallies in shares of GameStop and other so-called meme stocks suggests that risk-takers are riding high in more speculative corners of the market.

In options markets, the Cboe Volatility Index, known as Wall Street’s "fear gauge" because it shows demand for protection against stock swings, stood near its lowest level in about two months on Tuesday.

Many of those moves have been driven by rekindled hopes that the Federal Reserve can pull off an economic soft landing, where it is able to cool inflation without badly hurting growth and eventually transition to cutting interest rates.

Still, while Fed Chairman Jerome Powell has downplayed the potential for rate hikes this year and recent data showed cooling in the labor market, the soft landing scenario is by no means a foregone conclusion.

Another stronger-than-expected inflation reading on Wednesday could spark more worries that a too-hot economy will force the Fed to raise rates again, throwing cold water on investors’ recent optimism and undercutting the case for more gains in stocks and bonds.

"It's a pretty critical short-term report," said Keith Lerner, co-chief investment officer at Truist Advisory Services. "If you look at a lot of the markets right now, they're at potential inflection points."

Markets tend to be more volatile on days of CPI releases. The S&P 500 has moved by 0.7% on CPI days over the past year, on a median basis, versus 0.5% on all other days, according to an analysis by Goldman Sachs strategists. The 10-year U.S. Treasury yield moved by 11 basis points on days of CPI releases, compared with a typical move of 4 basis points on all other days, the analysis showed.

S&P options currently show traders pricing in a move of 0.9%, derivatives strategists at Barclays said in a note on Tuesday.

"While there is potential for significant volatility in either a CPI beat or a miss, equity volatility is priced for a more benign outcome," the Barclays strategists wrote.

The CPI index for April is expected to have climbed 3.4% on an annual basis, according to a Reuters poll of economists. On Tuesday, Powell reiterated that he believed that the Fed’s next move is unlikely to be a rate increase. He also said he still expects inflation to cool throughout 2024, though his confidence in that has fallen after prices rose faster than projected through the first quarter.

Fed futures show the market expects about 40 basis points of monetary policy easing this year, according to LSEG data. That compares to more than 150 basis points that had been priced in January.

"The market overall is really pricing in rate cuts," said Jack Ablin, chief investment officer at Cresset Capital. "In order to fulfill these expectations, we're going to need data like CPI to cooperate."

Despite the recent gains in stocks, market indicators generally do not suggest too much speculative excess or over-exuberance.

The forward price-to-earnings ratio for the S&P 500 has risen to 20.5 times, well above its historic average of 15.7, according to LSEG Datastream. Still, that's below the 21.2 level the index reached in March.

Investor sentiment is at its most bullish level in a month, according to the widely used survey from American Association of Individual Investors, which could raise the bar for positive surprises to help stocks. But the portion of investors reporting bullish sentiment, 40.8%, is below where it stood earlier in the year.

Some market watchers do see worrying signs. Matt Maley, chief market strategist at Miller Tabak, said that the market’s rebound after falling from its March record high leaves it vulnerable to a chart pattern known as a double top.

That’s "one of the most bearish signals we see in technical analysis," Maley said in a note on Monday. "If this week’s inflation data creates a substantial reversal, it’s going to be a very negative development," Maley said.

(Reporting by Lewis Krauskopf; additional reporting by Saqib Iqbal Ahmed and Terence Gabriel; Editing by Ira Iosebashvili and Michael Erman)