What happened

In what was a difficult period for banks, Bank of America (BAC -0.21%) concluded the first half of 2023 down 13.4% year to date (YTD) through June 30, according to S&P Global Market Intelligence. As of July 14, Bank of America was down about 10% YTD, trading at just over $29 per share.

It was well off the pace set by the S&P 500 index, which was up 15.9% in the first half. 

So what

While Bank of America was down significantly in the first half of 2023, investors can't be too disappointed with its performance. In what was a brutal period for banks, the nation's second-largest bank outperformed when you consider the fact that the KBW Bank Index, which tracks the performance of the country's largest banks, was down 20.5% YTD through the first two quarters of the year.

The failure of two major banks in March, followed by a third bank collapse in April, brought down most banks throughout the industry. But some of the megabanks, including Bank of America, were less impacted -- in fact, the bank saw a surge of deposits come its way after the bank meltdowns as customers sought the safety and stability of large, well-capitalized, highly regulated banks.

And while its stock price fell, Bank of America actually had a really strong first quarter, as revenue was up 13% to $26.3 billion, buoyed by a 25% year-over-year increase in net interest income. Deposits were only down 3% year over year in the quarter, but as mentioned, they surged at the end of March. Overall, net income rose 15% to $8.2 billion, or $0.94 per share.

Now what

Bank of America posts its second-quarter earnings next week on July 18, so investors should be tuned into those results.

But with a pause in interest rate increases, stronger-than-expected gross domestic product (GDP) growth in the first quarter, and inflation dropping down to 3% in June, the economic conditions are starting to look more favorable for the bank.

And the stock price is trading near its lowest valuation in years, with a price-to-earnings (P/E) ratio of just 8.9 and a price-to-book (P/B) ratio of 0.94.

This is an opportune time to jump in with Bank of America, which is Warren Buffett's second-largest holding in his portfolio at Berkshire Hathaway. It was one of the few banks that he increased his investment in the first quarter.