At Wells Fargo, the glass is always half full. Image source: iStock/Thinkstock.

The vote in the United Kingdom last month to separate from the European Union is bad news for banks almost across the board. But there is one exception, as we learned when Wells Fargo (NYSE:WFC) reported (link opens PDF) second-quarter earnings.

That exception is mortgage volumes. Although Wells Fargo's total mortgage banking revenue fell in the second quarter due to lower mortgage servicing fees and less income from the sale of mortgages to institutional investors, its origination volume grew 43% compared to the first quarter and applications were up 21% relative to the year-ago period.

The sequential increase in origination volumes is seasonal, as more people tend to buy and sell houses in the second quarter. But the year-over-year boost to Wells Fargo's application pipeline suggests that more people are taking advantage of low interest rates, which fell even further after the results of the Brexit vote were released on June 23.

US 30 Year Mortgage Rate Chart

US 30-Year Mortgage Rate data by YCharts.

It may seem odd that mortgage rates in the United States would be influenced by a vote in the United Kingdom. But it's true.

When most people get a mortgage, the bank that originates the loan turns around and sells it to Fannie Mae and Freddie Mac. The government-sponsored enterprises then bundle the mortgages into securities, which are sold to institutional investors -- sovereign wealth funds, pension funds, insurance companies, etc. And because the securities are insured by the federal government, by way of Fannie Mae and Freddie Mac, they are among the safest assets in the world.

This means that when global economic uncertainty rises, so does the demand for mortgage-backed securities -- as well as demand for the mortgages used to create the securities. To meet the heightened demand, banks lower mortgage rates, which incentivizes people to buy homes or refinance their existing mortgage.

This is exactly what we've seen since the Brexit vote, as Wells Fargo's chief financial officer John Shrewsberry pointed out on the bank's second-quarter conference call:

Since Brexit and the related decrease in mortgage rates, we've seen refinance activity increase with our retail application volumes up approximately 15% to 20% in recent weeks, and we currently expect origination volume to be somewhat higher in the third quarter compared with the second quarter.

While this is good for all banks, Wells Fargo should benefit more than most. It underwrote $105 billion of mortgages in the first six months of 2016. That's twice as much as runner-up JPMorgan Chase's $53 billion.

This doesn't mean that Wells Fargo is happy about the outcome of the Brexit vote, as any increase in mortgage revenue that comes from lower interest rates will be more than offset by depressed interest income from its asset portfolios. But this nevertheless demonstrates the benefit of Wells Fargo's broadly diversified revenue streams, which is one of the bank's many selling points to current and prospective shareholders.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.