After an absolute disaster of a year in 2022, the stock market appears to have turned the corner. Each of the major market indexes has gained more than 20% from their respective trough. Perhaps more importantly, the S&P 500 and the Nasdaq Composite are within striking distance of new highs, which will check the final box marking the start of a new bull market.

Closing out the old and ringing in the new is a great time for examination, and one of the places I start is with my portfolio. A review of my top investments and how they came to be that way can offer valuable insight for the future.

Here's a look at my six largest holdings heading into 2024 (as of the market close on Dec. 15) and the incredibly valuable lesson I learned from each one.

Person reviewing charts and graphs on a computer and printouts.

Image source: Getty Images.

No. 6: Nvidia

Every investor has one -- the "stock that got away." The one you meant to buy, only to find that it got away from you and has risen 100%, 500%, or even 1,000%. In my case, that stock was Nvidia (NVDA 6.18%). I had owned a few shares of the graphics processing units (GPU) pioneer in the early days of my investing journey but ultimately sold them in an unprovoked bid of tax-loss harvesting in early 2010.

I always meant to buy it back, but the stock price meandered for much of the next five years, and I ultimately lost confidence. Things changed quickly in 2016 when the stock tripled. After that, it just kept getting away from me.

Fast forward to early 2018. Nvidia still dominated the discrete desktop GPU space, controlling roughly 70% of the market. The company's graphics cards were the processor of choice for cryptocurrency mining, which was booming. Furthermore, there was an ongoing push toward autonomous driving. It was clear that CEO Jensen Huang had a knack for skating to where the puck was going -- recognizing technology trends on the fly and adapting Nvidia's processors and the accompanying software to meet that need.

After much deliberation, I held my nose and bought Nvidia anyway -- even though the stock had risen 600% over the preceding two years. I have added to my stake several times since. Over the past few years, Nvidia has once again adapted to meet a compelling technology need, becoming the gold standard for generative AI applications.

Since that initial purchase, Nvidia has soared 768%, and the stock has become my sixth-largest holding, amounting to nearly 6% of my portfolio. The lesson here? It's never too late to buy a quality company, even if the stock has already risen many times over.

No. 5 and 4: Shopify and Amazon

Long after Amazon had established itself as the world's largest digital retailer, Shopify (SHOP 1.11%) came on the scene with a different approach to e-commerce. Shopify's founders, having discovered firsthand the difficulties inherent in starting an online sales platform, pivoted the business from selling snowboards to providing customizable templates and other tools that made setting up and running an e-commerce business a snap.

By solving a common problem among digital retailers, Shopify carved out a profitable niche for itself in a market that was already (and still is) dominated by Amazon. While it isn't an exact apples-to-apples comparison, it helps illustrate an age-old truth in investing that I learned from owning this stock -- there's a Pepsi for every Coke.

There's another lesson here. I had long been a shareholder of Amazon, but I recognized the value Shopify could bring to the online sales space. Despite the fact that e-commerce was already well represented in my portfolio, I made a sizable investment in Shopify.

That decision turned out well, as both companies have continued to prosper in the age of digital retail. It also turned out well for me as an investor. Since my first purchase of Shopify shares, the stock is up more than 1,446%, while Amazon has gained 844%. Shopify and Amazon are my fourth and fifth largest holdings heading into 2024, each representing roughly 6% of my portfolio.

No. 3: Apple

There's little question that Apple (AAPL -0.35%) has become one of the most successful companies in history. Yet, at times over the past few years, some investors concluded the company had reached its zenith. Apple reached a market cap of $1 trillion in 2018, so how much higher could it go?

There were other worries. As penetration has risen, global smartphone sales have slowed. Since Apple's flagship product -- the iPhone -- historically generates more than half the company's revenue, investor reservations are understandable.

Despite these challenges, Apple has continued to grow. CEO Tim Cook has succeeded in expanding Apple's services business to become the company's second-biggest breadwinner, behind just the iPhone. The segment brought in $85 billion in fiscal 2023 (ended Sept. 30), making it comparable to a top 50 company in the Fortune 500. Furthermore, the iPhone continues to dominate where it matters, capturing a record 45% of worldwide smartphone revenue and 85% of profits in the second quarter, according to Counterpoint Research.

Fears that Apple simply couldn't go any higher turned out to be unfounded, an important lesson for investors as its market cap has tripled since 2018. Since my first purchase in 2008, Apple's stock price has surged more than 3,400% to become my third-largest position at 8% of my portfolio. I'm confident there's more to come.

No. 2: Mercadolibre

It's likely that many investors have never heard of MercadoLibre (MELI 3.09%). The company, which began as a local online auction site, has evolved into the largest e-commerce and payments ecosystem in Latin America, serving 18 countries in the region.

MercadoLibre not only provides a marketplace for buyers and sellers but also handles shipping and logistics, warehouse and cross-docking, digital payments, consumer and merchant financing, digital wallets, and more. Think of it as the Amazon, Shopify, and PayPal of Latin America all rolled into one.

Many investors have avoided the stock because of the risks inherent in the region, which is understandable. For example, Argentina -- MercadoLibre's birthplace and one of its biggest markets -- has an inflation rate that clocks in at 143%, and the country just devalued its currency by 50%. Other countries in the region grapple with hyperinflation, economic turmoil, charges of political corruption, poor infrastructure, and more.

Yet those risks pale in the context of the opportunity. Latin America is years behind the U.S. in terms of e-commerce and digital payment penetration, yet adoption continues to grow. Furthermore, Latin America has twice the population of the U.S. and is the fastest-growing e-commerce market in the world, according to Americas Market Intelligence. Finally, because MercadoLibre takes a cut of each transaction, it has sidestepped many of those risks. As a result, its revenue grew 50% in 2022 while net income soared 480%, a trend that has been ongoing for more than a decade.

Understanding the risk, viewed through the lens of the significant long-term opportunity, can provide important insight, which gave me the confidence to buy the stock. My rather modest initial investment in MercadoLibre in 2009 has grown by more than 7,300%, and the company now represents 10% of my portfolio. Not bad for a "risky" stock.

No. 1: Netflix

Netflix (NFLX -0.63%) was the very first stock I bought when I started investing in late 2007. After incurring a late fee at Blockbuster (remember them?) that was more than the cost of buying the movie new, I cut up my membership card and subscribed to Netflix. As an extremely satisfied customer, it made perfect sense to buy the stock once I started investing.

Back then, the company was a DVD-by-mail service that had recently begun experimenting with streaming video. Netflix had achieved remarkable penetration in its earliest markets, and I surmised the company could expand its success across the country, which was the basis of my investing thesis.

The company has achieved all that and more, becoming the world's largest subscription streaming video service. The value of the initial shares I bought in 2007 has surged more than 19,000%, making Netflix my largest holding at nearly 11% of my portfolio.

However, those life-changing gains were only possible because I held the stock for the duration, which is easier said than done. Remember the "Qwikster" fiasco of 2011? All the "Netflix killers" over the years? How about the loss of 1.2 million subscribers early last year?

There were plenty of excuses to sell Netflix over the years, but for me, the investing thesis never changed, so I held on. And this long-term buy-and-hold strategy continues to win out.