What happened 

Meta Platforms' (META 2.10%) shares were inching higher today even though two analysts cut their price targets for the tech company today. Investors brushed off the analysts' opinions and instead took their cue from a generally optimistic sentiment in the market today. 

The S&P 500 was up by 1.9% and the tech-heavy Nasdaq Composite gained 2.3%, which likely helped buoy Meta's stock, which was up by 4.6% as of 12:24 p.m. ET. 

So what 

Morgan Stanley analyst Brian Nowak lowered his price target for Meta's stock from $300 down to $280 today, but kept an overweight rating on the stock. Nowak mentioned a slowing advertising market for this year and next as the reason for the price target cut. 

A man looking at a computer.

Image source: Getty Images.

Similarly, Credit Suisse analyst Stephen Ju lowered his target for the tech stock from $273 down to $245, and maintained his outperform rating. Ju also believes ad revenue will slow down because of macroeconomic issues. 

But Meta investors appeared to ignore the analysts' comments and instead focused their attention on the fact that investors were generally upbeat in the broader market today. 

While the market has been especially volatile lately, some investors may have already priced in rising inflation, upcoming Federal Reserve interest rate hikes, and the potential for an economic slowdown for some stock prices. 

Meta has already fallen 49% over the past 12 months and some technology investors may now be thinking that the sector has reached the bottom and might be anticipating a rebound.

Now what 

There's still a lot of uncertainty in the market right now, so there's no guarantee that Meta's share price gains today will stick. 

Investors will get a much clearer picture of how Meta is navigating current headwinds when the company reports its second-quarter results on July 27.