By Simon Clark and Noemie Bisserbe

BNP Paribas SA shares rose as much as 6% Friday as the French lender's earnings suggested it is navigating the coronavirus pandemic better than several other European banks, driven by a boom in its trading businesses.

The lender benefited from heavy trading by clients who took advantage of favorable market conditions, as volatility caused by the pandemic forced investors to reposition their portfolios in a hurry.

Global markets revenue jumped almost 64% in the second quarter, with revenue at the bank's fixed-income operations more than doubling from a year earlier to EUR2.01 billion ($2.38 billion), the bank said in a statement.

BNP Paribas fared better than several of its European rivals in the quarter. Germany's Deutsche Bank AG and the U.K.'s Barclays PLC reported much smaller profits. Spain's Banco Santander SA posted an unexpectedly large loss after booking a EUR12.6 billion charge to lower the valuation of some previous acquisitions, which it attributed to the deteriorating economic outlook. About half of the charge came from Santander's U.K. business.

National lockdowns to stop the spread of the coronavirus have taken a heavy toll on European companies and banks have been forced to set aside billions of euros to provision for defaults. European banks had already been struggling for years with low interest rates, stringent regulatory capital requirements and sluggish economies.

BNP Paribas, one of Europe's largest banks, beat analyst expectations as its overall net profit fell 7% to EUR2.3 billion in the three months ended June 30 compared with a year earlier.

The Paris-based lender set aside EUR1.45 billion in the quarter to cover credit losses. In the same quarter last year, provisions were EUR621 million. The second-quarter provisions add to the EUR1.43 billion it stowed away in the first quarter.

"Our diversified banking model has proven its effectiveness," Chief Executive Jean-Laurent Bonnafé said. "BNP Paribas was able to quickly mobilize its teams, resources and expertise."

The French bank was optimistic about the rest of the year. After a low point in April and May, "the rebound in June in Europe was stronger than expected," BNP Paribas said.

In the U.K., which has reported the most deaths from the coronavirus in Europe, NatWest Group PLC said Friday it swung to a GBP993 million ($1.29 billion) loss in the second quarter after it set aside GBP2.06 billion in provisions for bad loans.

Write to Simon Clark at simon.clark@wsj.com and Noemie Bisserbe at noemie.bisserbe@wsj.com