Since last November, Bank of America (BAC 0.44%) stock has gone on a tear, gaining nearly 44%. Bank stocks have benefited from the Federal Reserve pausing its interest rate-hiking campaign. However, inflationary pressures remain sticky, pushing back interest rate cut expectations for 2024.

Given this evolving backdrop, does Bank of America deserve a spot in your portfolio?

Bank of America is sensitive to changes in interest rates

One reason for the company's rising share price is the Federal Reserve and its interest rate policy. In July, the Federal Reserve made perhaps its final interest rate hike of the cycle when it raised the federal funds rate to an upper range of 5.5%. In December, the Federal Reserve continued to hold interest rates in place, and the committee projected that it would cut them three times in 2024.

This set off a flurry of stock buying in interest rate-sensitive sectors like banking. Markets priced in even more rate cuts, and at one point early this year, the futures markets priced in as many as six interest rate cuts during the year.

However, inflation has remained elevated, causing markets to trim back their rate-cut hopes for the year. After falling for several months, the year-over-year change in the core Consumer Price Index (CPI), which measures consumer prices and excludes volatile energy and food prices, has remained sticky around 3.8% to 3.9%, above the Federal Reserve's 2% inflation target. As a result, markets are now pricing in only two interest rate cuts by the end of the year.

BofA sits on huge unrealized losses in its loan portfolio

Bank of America shareholders may also be concerned about the bank's rising unrealized losses. Since the Federal Reserve began hiking interest rates in the first quarter of 2022, the bank's unrealized losses have ballooned from $13.7 billion to $112.8 billion.

A bar chart shows Bank of America's unrealized losses over the past several quarters.

Chart by author.

These unrealized losses result from the Federal Reserve raising interest rates at the fastest pace in over four decades. They represent the losses a bank would take if it were forced to sell those securities in the open market today.

Changing interest rate expectations, which could weigh on net interest income, or discomfort with its significant unrealized losses may be a couple of reasons why investors would want to sell Bank of America stock.

Investors shouldn't be too concerned about its unrealized losses

Significant unrealized losses are uncomfortable, but there are reasons to be optimistic about the bank's long-term outlook.

Most of Bank of America's unrealized losses are on its held-to-maturity portfolio. This means that the bank intends to hold these bonds until they mature, meaning the bank shouldn't have to realize losses as long as it's not forced to raise capital in a crunch by selling these securities.

However, things don't always go according to plan. Just ask Silicon Valley Bank (a subsidiary of SVB Financial). Last year, the bank catering to start-ups saw a massive outflow in deposits, which forced it to dump its mortgage-backed bond and other securities at a massive loss.

Bank of America's deposit base is huge and diversified across industries, geographies, and customer classes, making it less vulnerable to a bank run like Silicon Valley Bank experienced. In fact, over the past year, Bank of America's deposits increased by around 0.6%.

Two smiling people stand at an ATM outside.

Image source: Getty Images.

The bank expects a second-half rebound

Despite some headwinds, there are still good reasons to hold on to Bank of America stock today. BofA's high-quality customer base provides a stable deposit base and positions it to ride out a potential economic slowdown. The first-quarter 2024 average FICO score of BofA credit card borrowers was 777, while its auto borrowers had an 801 average score.

In addition, CFO Alastair Borthwick told investors during the bank's April earnings call that the bank was encouraged by the trend of slowing delinquencies and believes net charge-offs will likely level out over the next quarter or two.

Another thing to watch for is the bank's net interest income (NII). BofA's NII fell 3% in the first quarter as the tailwinds from higher interest rates faded. However, the bank has used the "higher-for-longer" interest rates to replace lower-yielding assets with higher-yielding ones, which should benefit NII in the long run. Borthwick told investors he expects NII to expand during the second half of the year.

Buy, sell, or hold Bank of America?

Bank of America has a long history of prudent capital management, riding out challenging times across economic cycles and growing during periods of growth. Today, the stock is reasonably priced, at 13.3 times earnings and 1.5 times tangible book value, putting the current valuation right around its 10-year average.

Current investors should continue holding shares. While changing interest rate expectations and significant unrealized losses may feel uncomfortable, BofA is well-positioned to weather the storm and continue delivering for long-term shareholders, making it a buy.