Bank of America (BAC -0.21%) hasn't necessarily been a fantastic stock to own in recent times. In the trailing one-, three-, five-, and 10-year periods, shares have underperformed the S&P 500.

It's been even more discouraging in 2023, as Bank of America is down 8% (as of Dec. 7).

As we set our sights on the future, though, should investors buy, sell, or hold this massive bank stock? Let's look at the arguments on all sides of the discussion with Bank of America.

The case to buy and hold

There are some notable reasons to either buy the stock for new investors, or to continue holding for existing shareholders.

For starters, Bank of America is posting solid financial results. Revenue (net of interest expense) was up 3% in the latest quarter (Q3 2023 ended Sept. 30). Diluted earnings per share rose 11%. Both of these headline figures easily beat Wall Street expectations. This strong momentum is worth paying attention to because it could lift the share price.

Although Bank of America is a diversified financial institution, at a high level, all banks take in deposits and lend capital out, paying and charging for this facilitation. Consequently, a rapid change in interest rates, like what we've seen in the U.S. since the start of 2022, can have a meaningful impact on operations.

For this bank, though, the current environment is helping drive up net interest income. Consequently, the net interest yield, which also takes into account what Bank of America pays to depositors, expanded from 1.87% a year ago to 2.12% in the latest period.

The mark of a great business is the presence of an economic moat. Bank of America's competitive standing is bolstered by its cost advantages, particularly as they relate to its low-cost deposit base, and switching costs. Consumers, small businesses, and corporations are unlikely to change banking providers due to the headaches it would cause.

The fact that Bank of America has a moat might explain why Warren Buffett's Berkshire Hathaway has such a massive stake in the company. Bank of America is currently the conglomerate's second-largest holding, with a market value of $32 billion. That's a notable endorsement.

The case to sell

Investors should also understand the biggest reasons to sell this stock.

As I noted above, banks are affected by changes in interest rates. And naturally, this makes them very cyclical and sensitive to what happens with the broader economy. Buying these types of businesses right before an economic recovery could be a smart move, but this is almost impossible to execute successfully.

Cyclical companies have a certain level of risk that businesses experiencing more consistent and stable demand don't see. As things stand today, there is still the possibility that a severe recession will happen. And this would lead to rising defaults for Bank of America.

CEO Brian Moynihan mentioned on the Q3 2023 earnings call that consumer spending is showing signs of slowing down, which could be a harbinger of worse things to come. It's worrying that a company's fortunes could quickly change. I'm not a fan of businesses that are overly exposed to the economic cycle.

I also view banking institutions as being complex machines that are hard to fully understand. The regional banking crisis earlier this year is a perfect example of the risks that aren't easily observable.

Even Bank of America, a too-big-to-fail bank, has gotten in some trouble. Its held-to-maturity bond holdings carried an unrealized loss of $131 billion as of Sept. 30. Perhaps this is why shares have been such a disappointment in 2023.

I think the reasons to avoid this stock hold more weight than the bullish arguments, so I'm staying away.