(Bloomberg) -- Rising interest rates that caught many US banks off guard are proving a boon for the nation’s largest, with JPMorgan Chase & Co. posting a record profit and some of its top rivals signaling stronger-than-expected earnings from lending.

With customers borrowing more and stomaching higher rates to do so, JPMorgan and Wells Fargo & Co. both lifted forecasts for revenue from loans as they reported second-quarter results Friday. Citigroup Inc. unveiled a surprisingly strong jump in revenue from credit cards. That all threaded with fresh economic data showing consumer sentiment is improving as inflation eases.

The kickoff to US bank earnings underscored the diverging performance of lenders this year, with the country’s largest attracting new customers, making loans, and — in JPMorgan’s case — scooping up failed lender First Republic Bank for yet another boost to its bottom line. Executives spent the morning describing something of a sweet spot for lending, with rising revenue outpacing the impact of souring loans to customers no longer able to keep up with payments.

“The US economy continues to be resilient,” JPMorgan Chief Executive Officer Jamie Dimon said. “Almost all of our lines of business saw continued growth in the quarter.”

Shares of JPMorgan rose 1.2% as of 10:20 a.m. in New York. Wells Fargo was little changed, while Citigroup fell 1.5%.

At JPMorgan, net income jumped 67% to $14.5 billion, helped by a $2.7 billion gain on its acquisition of First Republic. Return on common equity climbed to 20%.

The bank predicted net interest income will surge about 30% this year after previously forecasting 26%. Wells Fargo said it expects a 14% increase, up from 10%. 

That contrasts with the picture for firms more dependent on trading and dealmaking, which are muddling through a slump. Analysts predict Goldman Sachs Group Inc., for example, may report its lowest rates of profitability in almost half a decade under Chief Executive Officer David Solomon. 

Read more: Goldman breaks own rule to flag results worse than rivals

Across the country, this year’s first half was marred by turmoil among small- and medium-size banks, as rising interest rates eroded the value of assets on their balance sheets. That prompted corporate clients and wealthy customers to shift deposits to banks perceived as stronger.

Despite concerns about a potential economic downturn in the US during the run-up to Friday’s results, the term “soft-landing” was oft-repeated in reactions by economists and analysts. 

“A lot of things simply have not happened,” Mohamed El–Erian, chief economic adviser at Allianz SE and a Bloomberg Opinion columnist, said on Bloomberg Television. “Everything this week,” including the consumer price index report, has pointed to a “soft-landing,” he said.

One sign of trouble came from Wells Fargo, which reported a $1.7 billion provision for loan losses, more than analysts expected. That included a reserve build tied to office-building loans.

The bank’s chief financial officer, Michael Santomassimo, said it’s still too early in the cycle to see the full effects of commercial real estate losses.

“We do expect that there will be more weakness in the market, and it’s going to take a while to play out,” he said. “It will be a while before we see the end of this.”

--With assistance from Jenny Surane.

©2023 Bloomberg L.P.