The stock market was mixed on Wednesday, with most major market benchmarks gaining ground. Yet not every index participated in the rally, as the Dow Jones Industrial Average (^DJI -0.98%) was down more than 100 points at 12:30 p.m. ET.

One big problem for stocks over the past year has been the persistence of inflationary pressures. For the first time in decades, high inflation rates have caused investors to reassess the long-term value of the stocks they own. In many cases, individual stocks have failed to pass the test, leading to dramatic declines.

The latest release of the Consumer Price Index (CPI) report from the Bureau of Labor Statistics initially pushed stocks higher. Yet many investors seem far from certain that inflation has ceased to be a problem, even as price increases have slowed.

Here's a look at what's happening with inflation and what it means for investors.

Inflation isn't dead yet

The headline CPI rose 0.4% in April compared to March after seasonal adjustment. Because of an even higher inflation reading in the year-ago period, April's gain brought the 12-month rise in the CPI down to 4.9%. That's the slowest pace in two years, but it's still more than double the 2% target that the Federal Reserve wants to see over the long run.

For the month, consumers saw mixed price movements from various goods and services. Food prices were flat, with increases in the cost of eating out offsetting decreases in grocery prices. Energy prices picked up 0.6%, as a 3% rise in gasoline prices offset declines in heating oil, electricity, and natural gas.

The so-called core CPI, which excludes food and energy prices, also rose 0.4% for the month and was up 5.5% since 12 months ago. A strong bounce in used-car and truck prices helped push the overall index higher, as did a 0.4% rise in shelter costs.

Of particular concern, though, is the fact that so many components of the CPI are up more sharply over the past 12 months even as energy prices have plunged. Even with this month's gains, gasoline prices are 12% lower than they were in April 2022, and heating oil is down more than 20%. Yet food prices are 7.7% higher, shelter costs are up 8.1%, and transportation services prices have climbed by double-digit percentages. That doesn't suggest an environment in which the Fed and other policymakers have conquered inflation.

Plenty of stocks are falling

Even with benign inflation data helping to give many stocks a boost, some companies missed out on the rally. Banks were notable underperformers, with declines in American Express (AXP -0.84%), Goldman Sachs (GS -0.71%), and JPMorgan Chase (JPM 0.15%) weighing down the Dow. Regional banks were also largely lower, although that reflects the longer-term concerns hitting the industry regarding the impact of interest rate increases over the past couple of years.

Some stocks actually do better when prices go up. Chevron (CVX 1.04%) led energy stocks lower on Wednesday, but the oil giant has been a big winner over the past year as a result of the boom in oil and natural gas prices throughout much of 2021 and 2022. Energy has also been sensitive to the potential for an economic recession, as falling levels of industrial activity are a key driver of reduced demand when the economy slows down.

Investors aren't getting the all clear they want

Many investors have hoped to get a clear sign that they can confidently invest in stocks without fear of another leg down in the bear market. The Fed wants inflation to fall much further before becoming comfortable backing off of its aggressive slate of interest rate hikes over the past 15 months. Despite many seeing the drop in inflation thus far as encouraging, it hasn't been fast enough to spur the Fed to loosen up its policy stance.

Until that happens, many shorter-term traders will remain uncomfortable with stocks. That will extend opportunities for longer-term investors to add to positions in the stocks they like the most -- as long as they can deal with the likelihood of a long fight against inflation.