Banks and industrial companies helped lift stocks on Wall Street mostly higher Wednesday, pushing the S&P 500 and Dow Jones Industrial Average past the record highs they set a day earlier.

The S&P 500 rose 0.2% after another wobbly day of trading. Nearly three-fourths of the companies in the benchmark index notched gains, including energy stocks, which rose along with the price of crude oil. Health care was the only sector to fall.

After a stumbling start to the week, stocks have been moving higher on the back of strong earnings and better-than-expected economic data.

Traders got a dose of decent economic news Wednesday when the Labor Department said that consumer prices rose 0.5% from June to July, down from the previous monthly increase of 0.9%. Year over year, consumer prices have increased a substantial 5.4%.

Investors' relief that the June data didn’t show a bigger increase in inflation may have kept stock prices moving higher, said Sam Stovall, chief investment strategist at CFRA.

“Our estimate was that June was going to be the peak month in inflation, and it appears that it was,” Stovall said.

The S&P 500 index rose 10.95 points to 4,447.70. The Dow gained 220.30 points, or 0.6%, to 35,484.97. Both indexes also set all-time highs on Friday and Tuesday.

Weakness in some technology stocks helped pull the Nasdaq composite slightly lower. It fell 22.95 points, or 0.2%, to 14,765.14.

Smaller company stocks rose. The Russell 2000 index picked up 10.98 points, or 0.5%, to 2,250.34.

Bond yields mostly edged lower. After reaching 1.36% in the early going, the yield on the 10-year Treasury slipped to 1.33% from 1.34% late Tuesday.

Investors’ concerns about inflation and uncertainty about the Federal Reserve’s future plans to ease up on its support for low interest rates have been hanging over the market.

While the headline figures may seem bad, most of the rise in consumer prices has been tied to very specific goods that are not expected to impact the long-term health of the economy, like used cars, building materials and hotel rooms. These items came into short supply during the pandemic, and the increased economic activity has made prices for those items rise faster than usual.

The Federal Reserve has repeatedly said it believes any increase in inflation would be temporary and largely a result of the supply disruptions that happened because of the pandemic. Investors will get another inflation snapshot Thursday, when the Labor Department issues its July wholesale price data.

Banks made some of the strongest gains Wednesday after bond yields initially edged higher, which benefits lenders because it allows them to charge higher interest on loans. Bank of America rose 1.3%.

Industrial stocks also helped lift the market. United Rentals climbed 5% for one of the biggest gains in the S&P 500.

Traders had a mix of earnings and corporate news to review. Coinbase, a platform where traders can buy and sell digital currencies like Bitcoin, rose 3.2% after reporting strong growth in the last quarter.

Weight-loss program operator WW International plunged 24.6% after reporting disappointing second-quarter financial results, while hamburger chain Wendy's rose 3.7% after raising its profit forecast for the year and increasing its dividend.

Meanwhile, the New York Stock Exchange will begin requiring on Sept. 13 that anyone entering its trading floor show proof that they've been vaccinated against COVID019, according to an email obtained by the Associated Press.

The policy change, which applies to anyone with access to the NYSE or American Options Trading Floors, comes as alarm grows over the rapidly spreading delta variant.

___

AP Economics Writer Christopher Rugaber contributed to this report from Washington.

Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.