Bank of America (BAC -0.21%) is one of the largest banks in the U.S. It is also known for being one of the largest holdings in Berkshire Hathaway's $363 billion portfolio.

The bank is known for its solid financial performance and navigating challenging times over the past few decades. As one of the largest banks in the U.S., Bank of America has dealt with challenges from the low-interest rate era, followed more recently by the period of higher-than-expected interest rates we are currently experiencing.

However, its stock performance has been underwhelming. Since the start of 2022, Bank of America has delivered negative returns of 27%, compared to the S&P 500 index, which remained flat during the same period. If you're considering buying Bank of America stock today, here are four things you'll want to consider.

1. BofA is the second-largest U.S. bank and offers a variety of financial services

With over $2.5 trillion in assets, BofA is the second-largest bank in the U.S., trailing only JPMorgan Chase. The bank offers traditional banking services, including checking and savings accounts, loans, online bill pay, and other payment services. Its banking business, including consumer, commercial, and corporate customers, accounts for about 70% of its income.

A bank teller meets with a customer.

Image source: Getty Images.

Additionally, Bank of America offers wealth and investment management services, providing investment advice and solutions on things like brokerage and retirement products. Finally, its investment banking business provides advisory and underwriting on equity and debt instruments. These two services account for 12% and 17% of this year's earnings and give it multiple revenue streams to round out the business.

Being a large bank has its headaches, including strict capital requirements and a higher degree of scrutiny from regulators. However, there are also benefits to being at the scale of Bank of America. Its various businesses provide diverse income sources that do well in different economic environments. Its traditional banking business benefits during times of rising interest rates. Investment banking can be volatile but provides upside in a good economy. Finally, its wealth and asset management segment provides it with a steady, reliable cash flow stream.

Additionally, its deposit base is diverse and spread among industries, geographies, and customer classes. As a result, its deposits shouldn't fluctuate like those of smaller banks that continue to struggle with outflows.

2. Rising interest rates benefited Bank of America last year

Since March 2022, the Federal Reserve has raised its benchmark interest rate from around zero to 5.25%. Rising interest rates can benefit bank stocks because they help increase the spread between the interest they earn on loans and the interest paid out on deposits.

Last year, Bank of America's net interest income grew by 22% as its yield on interest-earning assets jumped from 30 basis points to 1.96%.

BAC Net Interest Income (TTM) Chart

BAC Net Interest Income (TTM) data by YCharts.

3. Elevated interest rates have BofA sitting on $132 billion in unrealized losses

High interest rates are a double-edged sword for banks. They can help increase the net interest spread, especially in the early days of the interest rate hikes, as rates on loans adjust more quickly than deposit rates.

However, rates that continue to move higher can weigh on banks in a few different ways. For example, rising interest rates can slow the economy and result in less lending. They can also increase deposit costs as banks raise rates to retain customers. Finally, they can affect the value of investments banks hold on their books.

Interest rates and the value of bonds, such as Treasuries or mortgage-backed securities, have an inverse relationship. In other words, when interest rates rise, the value of those bonds goes down because they are less attractive compared to new investments that offer higher yields. As a result of the Federal Reserve's aggressive interest rate hikes, BofA sits on nearly $132 billion in unrealized security losses.

While this is undoubtedly significant, investors shouldn't be too concerned. The bank plans to hold the securities to maturity, and CFO Alastair Borthwick told investors, "We will anticipate that we'll have zero losses over time."

The unrealized losses become a real problem if they are forced to sell the way Silicon Valley Bank (an SVB Financial subsidiary) did back in March. However, Bank of America's deposits are quite diverse and more sticky than others, which should help it ride out these near-term challenges.

4. Bank of America is trading at a dirt cheap valuation

There is uncertainty around the banking sector because of the future path of interest rates and potential regulatory moves that could require banks to hold more capital in reserve. An economic slowdown would further add to banks' woes.

BofA stock seems to reflect these concerns, with investors valuing it at 1.28 times its tangible book value, 2.47 times sales, and a measly 8.6 times earnings -- all of which are below its 10-year historical average.

BAC Price to Tangible Book Value Chart

BAC Price to Tangible Book Value data by YCharts.

An intriguing price point for long-term investors

The banking industry will face headwinds in the near future as it grapples with the ongoing effects of higher interest rates that could potentially lead to an economic slowdown. However, Bank of America has done a solid job of navigating economic cycles in the past, and its cheap valuation could provide a good entry point for investors with a long-term horizon.