The stock market had an excellent year in 2023, with the S&P 500 producing total returns of about 26% for the year and the tech-heavy Nasdaq rising by about 54%. And as a result, many stocks that looked rather cheap at the beginning of last year have started to look a little expensive.

However, there are some companies that still look like excellent long-term opportunities for patient investors. As we head into 2024, two in particular that I'm looking at potentially adding to my portfolio are unique items marketplace Etsy (ETSY 0.34%) and space services company Rocket Lab USA (RKLB 3.29%). Here's why I think 2024 could be an excellent year for both, and why both could be home runs for long-term investors.

Growth has slowed, but management is making changes

Etsy was one of the biggest beneficiaries of the COVID-19 pandemic, as the surge in online shopping and the growing desire for unique items (especially face masks) caused millions to flock to Etsy's platform.

Fast-forward to the present, and Etsy's growth has slowed considerably. Economic headwinds have taken a toll on the business as well. As a result, sales on Etsy's platform have been roughly flat for the past two years. Plus, some of the company's recent acquisitions -- especially Depop and Elo7 -- didn't deliver nearly as much value as hoped.

However, there are some big reasons to be optimistic. Etsy's management is taking steps to focus on efficiency, recently announcing an 11% reduction in its workforce. The company is taking steps to improve the shopping experience on its platform, and Etsy could be a major beneficiary of improving economic conditions as the Fed starts to lower rates.

With shares down by more than 70% from their peak and down more than 30% in 2023 alone, Etsy isn't exactly cheap for no reason. But if management can successfully navigate the challenges and return the business to growth, shares could turn out to be a steal.

Could this be the next SpaceX?

SpaceX is by far the leader when it comes to launching payloads into space, as well as the successful Starlink satellite internet business. It reportedly commands a $180 billion valuation on the private market, and it isn't hard to see why. Unfortunately, most investors can't simply buy shares of SpaceX --not yet anyway.

The closest publicly traded company to SpaceX is Rocket Lab USA, which also specializes in getting things into space for customers, but currently operates at a much smaller scale. The company's Electron launch vehicle is the second most-frequently launched rocket in the U.S. (next to SpaceX's) and its missions have delivered 171 satellites to date. For context, SpaceX has launched more than 5,000 satellites just for its Starlink service alone.

However, there's a lot to like about Rocket Lab. For one thing, it has a private launch complex designed to support up to 120 launches per year, so it could certainly scale up over time from the 22 scheduled 2024 launches on the books. Second, and most significantly, the company is developing a much larger rocket (the Neutron), and management hopes to complete its first launch around the end of 2024. The Neutron's payload capacity will be about 50 times that of the Electron, so this could be a game changer for the business if successful. Finally, Rocket Lab isn't just a launch company. It also provides end-to-end space solutions for its customers, including design services and spacecraft components.

Rocket Lab USA currently trades at about 30% below its 52-week high, mainly due to concerns about a rocket failure in September 2023. But the business still has excellent momentum, and if its heavier rocket is a success, it could multiply its launch services business several times over.

Don't expect a smooth ride

To be perfectly clear, there is a lot of execution risk in both businesses, and even if things go well, they're both likely to be more volatile than the average stock. If I invest, I'm going to limit my position sizes, and expect a roller-coaster ride as these growth stories unfold.