Recently, data for both the Consumer Price Index and Producer Price Index came in better than expected for July. Investors use these indexes to gauge how inflation is trending, and both now suggest inflation may have peaked last month. That's welcome news to a stock market that has been hammered this year.

The declines were led by a drop-off in energy prices, so if this trend reverses, high inflation could persist. However, the Federal Reserve's ongoing rate hikes should also begin to bring down other prices soon. Here are three stocks to buy now that inflation looks to be peaking.

1. Bank of America

The second-largest bank in the U.S. by assets, Bank of America (BAC -1.07%), has been heavily sold off this year like most bank stocks. It was a little weird to see bank stocks sell off so intensely; the sector has been waiting for a real rising interest rate environment since the Great Recession. But with inflation at a 40-year high, investors were concerned that the Federal Reserve and its aggressive rate hikes might tip the economy into a recession.

That would be bad for banks because it could sap up loan demand and lead to higher loan defaults. Banks have also been dealing with reduced investment banking activity and higher capital requirements, which could limit capital returns in the near term.

But banks tend to benefit from a little inflation because they do get higher rates and can invest their deposits into higher-yielding assets. Bank of America is starting to see the benefit of higher rates and is guiding for higher revenue on loans and securities for the rest of the year. Loan growth has also started to come on. So if inflation can peak and the Fed can engineer a soft landing for the economy, the company will definitely benefit.

2. American Express

The world's premier credit card brand, American Express (AXP -0.84%), has actually fared pretty well this year. Its stock dropped roughly 3%, which is much better than the broader market. American Express would benefit from some easing inflation in the same way that Bank of America would. As a large credit card lender, American Express needs customers to keep taking on debt but also be able to pay down that debt.

Loan balances at American Express grew 8% in the second quarter, so it is not having any trouble with growth. But credit card debt can default at higher levels than other loan categories, so a more severe recession could increase credit costs. Furthermore, American Express runs its own payments network. If high inflation persists too long, it could slow consumer spending across the network.

3. LendingClub

Although it may not have the same established brand as Bank of America or American Express, LendingClub (LC -2.08%) is a big player in the unsecured personal loan space. Its main use case is consolidating credit card debt, which enables borrowers to pay back their credit card debt at a cheaper interest rate.

LendingClub completely changed its model in 2021 when it completed its acquisition of Radius Bank. That allowed it to use deposits to fund a portion of its loans, originate loans inside the company instead of through a third-party bank, and hold loans on its balance sheet. Since then, LendingClub has become a very profitable company.

Similar to the growth American Express saw in Q2, LendingClub originated a large number of loans, with $3.8 billion in volume, the most it has done in a quarter since buying Radius. But investors are worried about how credit quality will hold up in a more severe recession.

LendingClub also funds a large chunk of its originations by selling the loans to institutional investors. While LendingClub's borrowers have high FICO scores, investors have still been getting antsy, which is expected to slow origination volume in the current quarter. I still think LendingClub can successfully navigate a more severe recession, but its business would thrive if there weren't one.