Excitement surrounding artificial intelligence (AI) helped fuel the Nasdaq Composite by over 40% last year. In particular, the "Magnificent Seven" stocks played a major role in soaring markets during 2023.

One member of the club, Meta Platforms (META 0.43%), spent much of 2023 rightsizing its business by getting costs under control and returning to accelerated growth in its core advertising business. The strategy appears to be working, and investors are cheering on the company.

After surging over 190% last year, Meta has gotten off to a hot start in 2024. Following its fourth-quarter earnings report, Meta regained entry into the coveted trillion-dollar market cap club -- joining tech cohorts Microsoft, Apple, Alphabet, Nvidia, and Amazon.

While the stock is going parabolic, there are plenty of reasons to remain bullish long term. Let's dig into Meta's turnaround and assess why now could be a lucrative opportunity to buy the stock.

This could be a great year for the Nasdaq

The Nasdaq has been around for nearly half a century. In this time, the index only ended in the red on 14 occasions. Moreover, the Nasdaq seldom experienced periods of consecutive down years -- with 1973 and 1974, as well as 2000, 2001, and 2002 being the only exceptions.

In the last 20 years, the Nasdaq experienced drops of 30% or more on three occasions -- with 2022 being the most recent. As you may recall, 2022 was followed by a rock-solid 43% surge in the Nasdaq last year. Furthermore, following more pronounced sell-offs during 2002 and 2008, the Nasdaq soared for consecutive years thereafter. The index returned an average of about 16% per year from 2003 to 2007 and an average of 30% annually between 2009 and 2010.

These dynamics showcase the resiliency of the Nasdaq -- and the capital markets in general. While the past results are not necessarily an indication of future performance, the broader theme to keep in mind is that investors typically took advantage of increased selling activity following the Nasdaq's worst years. While 2023 was a rebound year for the tech-heavy index, there are some tailwinds that could help fuel further gains this year.

Stock chart with arrows going up.

Image source: Getty Images.

Meta's fantastic 2023

Meta CEO Mark Zuckerberg began the fourth-quarter earnings call with the following statement: "This was a good quarter and it wrapped up an important year for our community and our company." To call that an understatement wouldn't even do it justice. Meta's 2023 was nothing short of extraordinary.

For the full year 2023, the company reported total revenue of $135 billion -- up 16% year over year. More importantly, operating margin expanded by 10 percentage points and free cash flow grew by 138% year over year to $43 billion.

Meta was able to achieve growth across its top and bottom lines through a series of strategic pivots. First, following aggressive hiring in 2022 to bolster its metaverse ambitions, Meta reconsidered some of these moves last year and instituted a series of layoffs in an effort to reduce headcount and control costs.

Second, the company doubled down on its primary revenue and profit driver: advertising. While the metaverse is still largely going to be part of Meta's long-term vision, this business served as too much of a distraction in 2022. Meta spent much of 2023 getting back to its roots and returning to accelerated growth in its ads segment.

Meta stock looks attractive, despite the rally

Since reporting fourth-quarter results on Feb. 1, Meta stock is up over 15%. Obviously there is quite a bit of enthusiasm for the company, and some momentum has entered the stock action.

And yet, despite the rally, Meta stock only trades at a forward price-to-earnings (P/E) multiple of 27. For context, the forward P/E of the S&P 500 is about 22.3.

To me, there is one big-ticket item that is keeping Meta stock from trading at a greater premium. The company's metaverse operation is still unprofitable. Moreover, competition in the space from other big tech stalwarts such as Apple -- which just released its own virtual reality headset -- may be causing some trepidation. While Meta's vision beyond advertising is still an enigma, I am not worried for the company.

Meta is home to some of the world's most popular platforms such as Facebook and Instagram. The company is creatively implementing AI-powered applications throughout its business -- a strategy that could lay the foundation for exponential growth in the long term.

With such robust cash flow and encouraging revenue acceleration, it's tough to pass on Meta stock even after an earnings surge. Existing or new investors could use dollar-cost averaging as a prudent approach to build a position in the stock as the company continues to mature.