What happened

Shares of Facebook parent Meta Platforms (META -0.93%) rose as much as 2.7% on Tuesday. At the close, the stock was up about 1.6%.

The tech stock's gain was likely primarily driven by an upbeat day in the overall stock market, especially for tech shares.

Facebook CEO Mark Zuckerberg at a Facebook event.

Meta Platforms CEO Mark Zuckerberg. Image source: Meta Platforms.

So what

Capturing the optimism in the market on Tuesday, the S&P 500 was up 2% at the close and the tech-heavy Nasdaq Composite gained 3%.

It wasn't surprising to see tech stocks gaining more than the overall market on Tuesday. Many techs sold off sharply last week as investors were spooked by news of the Fed's commentary on potentially accelerating a plan for interest rate hikes and the arrival of a new coronavirus variant. Perhaps the market has deemed the omicron coronavirus variant to be not as big of a threat to the economy as some people had initially thought. In addition, the market may think that some tech stocks are undervalued, even in an environment where interest rates could increase.

Now what

Meta Platforms stock has had a rough few months. Even including the stock's gain today, shares are down 14% over the past three months. Investors should look past near-term headlines and focus on a stock's valuation relative to their assessment of the underlying business' long-term potential.

With Meta shares trading at just 23 times earnings, the market seems to already be pricing in a lot of uncertainty. This valuation is particularly attractive considering that analysts expect Meta's earnings per share to grow at an average annualized rate of 21% over the next five years.