Warren Buffett's incredible track record makes him one of the best investors ever. There's no denying that. His successful ability at allocating capital has made Berkshire Hathaway a trillion-dollar business. It makes sense that the average investor might keep a close eye on what's in its portfolio in order to find potential ideas.

As of Aug. 21, the conglomerate owned more than 605 million shares in a leading bank, a holding valued at $29 billion, making it Berkshire's third largest position. While this financial stock has produced a total return of more than 118% in the past five years, Berkshire has been a notable seller in the past year or so.

So should you still buy shares right now?

People standing in line in front of bank teller.

Image source: Getty Images.

Operating from a position of strength

The business in Berkshire's portfolio that investors might consider is Bank of America (BAC 0.09%). With $3.4 trillion in total assets, it's the second-biggest bank in the U.S. based on this metric. Based on the company's second-quarter financial performance, investors have reasons to be confident.

During the quarter, net revenue increased by 4% year over year. There was 7% loan growth. Net interest income was up for the fourth straight quarter. In a sign of credit quality, the net charge-off rate improved compared to Q2 2024. And the bank remains a leader in deposit gathering, with top retail market share.

Bank of America is a dominant financial services entity. Besides the factors already mentioned, one obvious reason why is because of how diversified its operations are. It has its hands in consumer and small business banking, corporate and investment banking, capital markets, and wealth management. If any segment comes under weakness, it can be offset by better results elsewhere.

Investors should follow in Buffett's footsteps in the sense that they should try and identify businesses that have an economic moat, or durable competitive advantages that help them outperform rivals and new entrants. Bank of America fits the bill. Its massive scale gives it a cost advantage. And as is the case with banks, there are switching costs for customers.

Tremendous capital returns

During the second quarter, Bank of America generated $7.1 billion in net income. The business is consistently profitable. This setup allows management to return lots of capital to shareholders.

Bank of America bought back $5.3 billion worth of its own stock in Q2. And it paid out $2 billion in dividends. The current dividend yield of 2.29%, which is significantly higher than the S&P 500's 1.25%, provides a nice income stream.

Investors can expect the capital returns to continue. Bank of America just approved authorization for $40 billion in share repurchases. And in the past decade, the dividend has climbed 460%.

Taking a cautionary view

Valuation can have a notable impact on the returns investors achieve. Bank of America shares trade at a price-to-book (P/B) ratio of 1.3 today. This is higher than the trailing five- and 10-year average.

Additionally, investors have to think about the broader economy. For what it's worth, there's always a certain level of uncertainty. And no one has any clue what interest rates are going to do, although there is a view that they will come down. Regardless, there's always the threat of a looming recession, which would negatively impact Bank of America and the industry at large. This is something bank investors can't ignore.

The fact that Buffett and Berkshire have been selling could be an ominous signal. And maybe it's best if investors avoid Bank of America right now. That perspective could change if the valuation was much more compelling, like at a P/B multiple below one.