Now that the month of July is in the rearview mirror, we can look back at the best-performing stocks in different industries. When it comes to banks -- big banks in particular -- that distinction goes to Citigroup (C -0.83%).

The New York-based bank gained 4.1% through July. That may not seem like anything to write home about, but it was enough to outpace JPMorgan Chase (JPM -0.47%), Bank of America (BAC -0.27%), and Wells Fargo (WFC -0.68%).

Bank

Stock Performance in July

Citigroup

4.1%

JPMorgan Chase

1.8%

Bank of America

0.8%

Wells Fargo

(2.4%)

Data source: YCharts.com.

It's a fool's errand to try to pin down the precise reason that one stock performed better than another stock over such a short stretch of time. Yet there seems to be at least one concrete explanation for Citigroup's outperformance vis-a-vis JPMorgan Chase, Bank of America, and Wells Fargo.

July was the month that these banks reported second-quarter earnings. And when it came to universal banks -- those with both investment and commercial banking operations -- Citigroup came out on top.

Its return on equity of 6.8% in the three months that ended June 30 left a lot to be desired, but in one important respect, Citigroup separated itself from the pack last quarter.

A Citigroup sign.

Image source: Getty Images.

I'm referring to trading revenue. Like other universal banks -- like JPMorgan Chase and Bank of America -- Citigroup generates revenue from serving as a market maker for institutional investors, helping them buy and sell securities.

However, unlike its competitors in this space, Citigroup's performance last quarter suffered less from a decline in market volumes and volatility in fixed-income securities -- a market maker's bread and butter, insofar as trading revenue is concerned.

Citigroup's income from fixed-income trading fell 6% in the second quarter. That's certainly not good, but it's much better than at JPMorgan Chase and Bank of America, which saw their fixed-income revenue drop by 19% and 14%, respectively, compared to the year-ago quarter.

Bank

2Q Trading Revenue, Change (YOY)

Citigroup

(6%)

Bank of America

(14%)

JPMorgan Chase

(19%)

Data source: Second-quarter earnings releases.

Furthermore, while Wells Fargo's trading operations aren't as meaningful as its competitors', it faced its own challenges in July. At the beginning of the month, a judge preliminarily approved Wells Fargo's agreement to pay $142 million -- and perhaps more -- to customers whose credit scores suffered as a consequence of the bank's fake-account scandal, which was revealed by the Consumer Financial Protection Bureau last September.

Since then, moreover, it's been reported that Wells Fargo's employees didn't just open fake checking and credit-card accounts for customers. The bank has also admitted to charging "several hundred thousand borrowers" for auto insurance that they neither needed nor asked for, resulting in delinquencies for many of these customers.

These nitty-gritty details aside, the point here is that Citigroup benefited significantly less from its own outperformance and more from the struggles of its closest competitors last month, which goes a long way toward explaining why it was the best-performing big bank stock in July.