It hasn't been the best year for financial stocks, especially those involving banking. In the months since Silicon Valley Bank's collapse, the sector has vastly underperformed the broader market. The S&P 500 is up by more than 17% year to date, while the financial sector is little changed.

Even so, some companies in that sector are still flourishing and bringing in profits.

^SPX Chart

Data source: YCharts.

1. Visa

Few businesses have a competitive advantage quite as strong as credit card and payment processing giant Visa (V -0.23%). Regarding reach, there's no close second to Visa -- it has more than 100 million merchants in its network. This is such an advantage for Visa because it makes money by taking a small percentage of every transaction on its payment network.

The more merchants in its network, the more transactions it can facilitate. In Visa's fiscal 2023 Q2 (ended March 31), revenue rose by 11% year over year, but its net income growth outpaced that, increasing by 17% to $4.3 billion.

Visa's strong financial performance was a byproduct of inflation and increased payment volumes (up 10%), processed transactions (up 12%), and cross-border transactions (up 24%).

Much of the investment it took to build Visa's vast merchant network occurred years ago. So now, the company is in a position to benefit from it without incurring too many additional costs. It's not like it relies on physical products that require set costs per item sold.

For perspective: Visa's 53% profit margin is comfortably above those of competitors American Express (26%) and Discover Financial Services (12.8%).

V Profit Margin (Quarterly) Chart

Data source: YCharts.

2. Bank of America

Bank of America (BAC -0.21%) is the country's second-largest bank by assets, trailing only JPMorgan Chase. This hasn't been the best year for its stock, though -- it's down 11% year to date. Yet Bank of America's bottom line is going strong.

In the first quarter, revenue increased 13% year over year to $26.3 billion, but maybe more importantly, net income rose 15% to $8.2 billion. 

Bank of America has benefited greatly from the Federal Reserve's rapid and steep increases to benchmark interest rates over the past year and a half. When the federal funds rate rises, it allows Bank of America to raise the interest rates it charges on mortgages, auto loans, personal loans, and credit card balances. Its $14.4 billion in net interest income in Q1 2023 was $2.9 billion more than in Q1 2022.

In the wake of the regional banking panic earlier this year, consumers have fled smaller institutions and moved their money to "too big to fail" banks like Bank of America. Its overall customer balances are down year over year as consumers spent down some of their savings, but it added 130,000 new consumer checking accounts in Q1, bringing its total to 36.1 million -- a company record.

The scale that earned it a too-big-to-fail designation is the key to Bank of America's long-term stability. That in itself doesn't make the bank a good investment, but it is a key selling point.

Add in Bank of America's dividend, which at current share prices yields roughly 3% (about double the average yield of the S&P 500 now), and it's clear why this is a stock that investors can feel comfortable holding long term.

3. Berkshire Hathaway

Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) is a conglomerate with around 60 subsidiaries across many industries. It also owns one of the world's most followed and analyzed stock portfolios, with large stakes in companies such as Apple, Bank of America, Coca-Cola, and dozens more.

Berkshire Hathaway's stock price has fairly consistently outpaced the broader market, and made a lot of investors richer along the way. Its Q1 revenue was up by more than 20% year over year, but that pales in comparison to its 536% net income growth. This was driven mostly by higher investment income.

Operating earnings -- profits from its wholly owned businesses such as Geico (and a metric the company's legendary Chief Executive Officer Warren Buffett prefers to focus on) -- exceeded $8 billion, which beat analysts' expectations.

Berkshire Hathaway is positioned to remain a great long-term investment long after the now 92-year-old Buffett is no longer leading the company. Its portfolio is one of the biggest beneficiaries of compound growth, and dividend income is sure to pad its bottom line for quite some time. The conglomerate is projected to receive over $6 billion in dividend income in 2023 alone.

The company spent around $4.4 billion buying back its own shares in Q1, which should signal to investors that Buffett and his team believe that the shares are priced at a good value and their long-term potential remains strong.