JPMorgan Chase & Co.’s first-quarter results were marred by a $524 million loss tied to market fallout from Russia’s invasion of Ukraine.

The loss was driven by “funding spread widening” and valuation adjustments for commodities as well as derivatives linked to Russia, the company said Wednesday in a statement. About $120 million of the loss was tied to “extreme price movements” in nickel, Chief Financial Officer Jeremy Barnum said on a conference call.

JPMorgan is one of the biggest players in global commodities, which have been rocked in recent weeks by the war. In one example, the bank was involved in the nickel short squeeze that hit the London Metals Exchange in March as the biggest counterparty of Tsingshan Holding Group Co., the world’s largest nickel producer that’s at the center of the squeeze.

The bank also reported a $902 million net reserve build, “driven by increasing the probability of downside risks due to high inflation and the war in Ukraine, as well as accounting for Russia-associated exposure,” it said. The increase marks the first time since 2020 that JPMorgan has built up its pile of money set aside for potential credit losses.

Still, fixed-income and equity-trading revenue both beat analysts’ estimates, bringing net income to $8.28 billion, also surpassing estimates.

The results offer the first look at how U.S. banks handled turmoil spurred by the war, as well as the global shift to higher interest rates. Volatility soared in the quarter, with commodity markets an area of particular upheaval. Chief Executive Officer Jamie Dimon wrote in his annual letter earlier this month that while JPMorgan’s direct exposure to Russia is limited, the New York-based firm could still lose about $1 billion over time.

About $300 million of the reserve build was for Russia-associated individual names, and the rest “reflects increasing the probability from a very low probability to a slightly higher probability of a, you might call it, Volcker-style, Fed-induced recession in response to the current inflationary environment,” Barnum said.

Shares of JPMorgan, which fell 17% this year through Tuesday, dropped 3.5% to $126.93 at 9:40 a.m. in New York.

JPMorgan’s fixed-income traders pulled in $5.7 billion in the first three months of the year, crushing analysts’ estimates by $1 billion. Equity traders also beat expectations, with $3.1 billion of revenue in the quarter.

Troy Rohrbaugh, the bank’s global head of markets, told investors last month that while the firm’s trading revenue was down 10% from a year earlier as of early March, “things have changed a lot.”

Investment-banking revenue fell to $2.1 billion, lower than the $2.3 billion analysts were expecting. Revenue from debt and equity issuance both dropped, while advisory fees gained from a year earlier.

Non-interest expenses rose 2% to $19.2 billion, less than analysts were expecting but still the highest quarterly figure since 2013, as Dimon continues his spending spree to fend off competition. The bank has faced investor backlash in recent months after executives said in January that they expected expenses to surge 8.6% this year.

Total loans at the end of the first quarter rose 6% from a year earlier, with commercial loans up 10% and credit-card loans 15% higher. Consumer loans excluding credit cards were down 4%. Loan growth has been a key focus for investors looking for signs of a rebound after a lending slowdown tied to pandemic-era stimulus. The firm raised its net interest income outlook for the year to $53 billion or more, up from the roughly $50 billion it predicted in January.

“We remain optimistic on the economy, at least for the short term -- consumer and business balance sheets as well as consumer spending remain at healthy levels –- but see significant geopolitical and economic challenges ahead due to high inflation, supply-chain issues and the war in Ukraine,” Dimon said in the statement.

JPMorgan is first among the top six banks scheduled to report. It’s followed Thursday by Citigroup Inc., Goldman Sachs Group Inc., Morgan Stanley and Wells Fargo & Co. Bank of America Corp. comes Monday.

This article was provided by Bloomberg News.