I recently decided to do a bit of repositioning in my stock portfolio. I sold my shares in Goldman Sachs (GS 1.79%), as my original reasons for buying -- the bank's consumer banking ambitions -- no longer apply. Then, I took the cash generated from the closing of that position and decided to add to my positions in three stocks that are some of my favorite investment opportunities as we head into 2024.

In no particular order, here are the three stocks I redeployed the money into, and why I'm so excited about each one.

A "replacement" stock

Goldman Sachs was a solid performer for me, but when an investment thesis is busted, it can be a good idea to move on. That's especially true if you see more attractive places to deploy capital, and that is the case here. So, I used about half of the money from my Goldman sale to add to my favorite bank stock position, Bank of America (BAC -0.21%).

2023 has been a turbulent year for banking, and economic uncertainty continues to weigh on much of the industry, even rock-solid institutions like Bank of America. The stock has underperformed the S&P 500 in 2023 by about 23 percentage points, despite 11% year-over-year earnings growth in the third quarter and excellent asset quality. In fact, although many investors are concerned about what inflation and rising rates could do to loan defaults, Bank of America's net charge-off ratio remains below where it was in 2019 -- before the COVID-19 pandemic and in a rather strong economy.

An unbelievable fintech bargain

PayPal (PYPL 2.90%) is a relatively new stock position for me, but I decided to add it to my portfolio. And I recently added some more shares.

Simply put, PayPal's valuation doesn't reflect the strength of the business. It trades for less than 12 times forward earnings despite generating roughly $5 billion in annual free cash flow. Recent results are moving in the right direction, with revenue growing 8% year over year in the third quarter and adjusted EPS growing by 20% thanks to great expense controls. The business has 430 million active accounts, processes $1.5 trillion in annualized volume, and is an integral part of how people pay for goods and services online and send each other money.

PayPal's management clearly agrees that the stock is a great value, allocating substantially all of its free cash flow in recent quarters to stock buybacks.

A beaten-down stock with a long-term focus

The third stock I bought this past week is Boston Omaha (BOC -1.30%), a small-cap company that can best be described as an early-stage conglomerate. It owns businesses in billboard advertising, insurance, broadband infrastructure, and asset management.

Boston Omaha has been the worst-performing stock in my portfolio in 2023. Despite a generally strong year for the stock market, Boston Omaha is more than 40% below where it started the year. However, I still believe in the business from a long-term perspective, and recent results are encouraging.

In the third quarter, Boston Omaha's revenue increased by 14% year over year, with all four parts of the business showing strong growth. It generated strong operating cash flow and has tons of cash on its balance sheet to pursue opportunities. Plus, it trades for a rare discount to book value, and as a long-term investor who isn't terribly concerned with short-term fluctuations, I decided to take advantage.

All three are long-term investments

As a final thought, I bought all three of these stocks because I think they'll produce market-beating returns over the next five, 10, 20 years, and beyond. I have absolutely no idea what they'll do in 2024, and all three could be rather volatile as economic headwinds play out. Invest with this in mind.