Thanks to his remarkable track record leading Berkshire Hathaway over the past several decades, Warren Buffett is an investing legend in the eyes of many. For the average investor, looking at what the conglomerate owns can provide potential stock ideas.

The Oracle of Omaha has been invested in Bank of America (BAC 1.36%) since 2007. This financial stock makes up 10.5% of Berkshire's massive $374 billion portfolio. In fact, it's currently the second largest holding.

Should you take a cue from Buffett and buy Bank of America shares right now?

Buffett's forever stock

The Warren Buffett of the 1950s and 1960s might have appreciated deep-value investments that he could buy and flip relatively quickly, repeating the process over and over again. He learned this style from his teacher, Ben Graham.

The Buffett of today is focused on finding forever stocks. High-quality businesses that Berkshire can buy and hold is the name of the game now.

Bank of America fits this description. In an economy where change and innovation are happening faster than ever before, perhaps there's no sector that has more durability and staying power than the banking industry. In our capitalist system, we need financial institutions to facilitate the smooth flow of capital from savers to borrowers. Just imagine what would happen if we didn't have banks.

I think Buffett has confidence that Bank of America will still be around decades from now, continuing to dominate the banking sector. He knows a thing or two about analyzing financial institutions as well.

To its credit, Bank of America is a massive organization with a diversified revenue stream. It has a presence in consumer and commercial banking, investment banking and capital markets, and wealth management. This lowers the dependence on one area to always be performing well.

Historically, the business has been able to grow its deposit base steadily. It now totals a jaw-dropping $1.9 trillion. This trend is a vote of confidence that Bank of America is a trusted brand in the industry. Having an ever-increasing flow of deposits provides the company with a very low-cost funding source that can be used to fuel loan growth.

It's also encouraging to see Bank of America investing heavily in its technological infrastructure to better serve customers and improve their experience. The company reported that 76% of its consumer households were using digital services to handle their banking needs. That should position the business well going forward.

Is Bank of America stock a smart buy?

Bank of America stock has had a solid year thus far, as it's up 11% (as of April 29). That gain outperforms the broader S&P 500. If we zoom out, however, it's a completely different story. The banking giant's shares have lagged the benchmark index in the trailing three-, five-, and 10-year time frames.

I think this disappointing trend will continue given the lack of sizable growth prospects. This is a very mature enterprise that already has a large presence in its core markets.

Plus, the valuation isn't as attractive as it was just six months ago. Back then, the stock traded at a price-to-earnings ratio of 7. That multiple has expanded to over 13 today. This is above the trailing five-year average.

But maybe you're an investor who doesn't really care about beating the market over the long term. In that case, I believe that it's totally reasonable to want to follow in Buffett's footsteps and add Bank of America to your portfolio. The business pays a healthy 2.5% dividend that can boost your returns, too, catering to those who appreciate generating income from their holdings.