Like many stocks, Airbnb (ABNB 1.20%) has had a solid run year to date, up 36%. However, while a broad swath of the market has consistently risen through the first half of the year, Airbnb's stock has essentially flatlined since late February.

So is this all the performance Airbnb can muster for the year? Or is there further upside ahead? Let's find out.

Two factors loom over Airbnb's impressive performance

Airbnb is the leader in alternative stays and experiences. While a few competitors exist in this space, none have become synonymous with the industry like Airbnb has.

Coming into 2023, many investors were worried that Airbnb wouldn't be able to generate enough demand thanks to a slowing economy. However, that's not what Airbnb saw in the first quarter as revenue rose 20% year over year to $1.8 billion. But the slowdown is coming as management guided for 14% growth (at the midpoint) in the second quarter. Part of this headwind can be attributed to tough year-over-year comparisons, as Q2 2022 saw an explosion in demand thanks to COVID subsiding.

Looking forward, Wall Street analysts expect 13% revenue growth for 2023 and another 13% in 2024. While those figures are a far cry from the 20% or greater growth Airbnb has enjoyed over the past year, it's still higher than the market pace and impressive for a company of Airbnb's size.

But that doesn't mean Airbnb won't face challenges along the way.

U.S. consumers are heavily in debt and maintaining their lifestyles through debt. This can't last forever, and when push comes to shove, people will likely cut non-essential spending, which could hurt Airbnb.

Airbnb also faces heavy regulatory challenges. It's no secret that Airbnb has been blamed for causing housing supply issues as renting out properties out for short-term stays can be more profitable than having a long-term renter. Places like New York City have enacted strict regulations on Airbnb-style rentals, and others are beginning to follow suit.

This is a trend to watch as Airbnb may not be able to add as many properties to the platform as it wants.

But are either of these valid reasons to avoid the stock?

The stock has earned a slight premium

Looking at Airbnb's valuation makes the stock look pricey at 39 times earnings. However, the stock looks more palatable when you factor in Airbnb's improving profitability and consider forward earnings, which use analyst projections.

Chart showing Airbnb's PE ratio and forward PE ratio down since early 2022.

Data by YCharts.

Some may argue that 33 times earnings is still expensive, but that doesn't consider Airbnb's impressive 82% gross margin and 23% net margin. Because Airbnb's margins are higher, it creates a greater amount of cash flow, which it can use to repurchase shares, make acquisitions, or pay a dividend.

Now, consider a software company like Adobe with a margin profile similar to Airbnb's. That stock has been trading at 50 times earnings for nearly a decade -- Airbnb doesn't look as expensive in that light.

Still, major external forces are at play, including potential shifts in consumer behavior and government regulations. So while I think Airbnb is still a buy at these prices, investors need to be careful not to let this stock become too oversized in their portfolios.