Last year, Tesla (TSLA -2.44%) showed once again why it's a favorite among the investment community, as the stock soared 102%. This gain trounced that of the broader Nasdaq Composite.

Now, as we set our sights on 2024, investors are wondering if it's too late to scoop up shares. After all, Tesla has produced a remarkable return of 2,280% in the last decade.

Is this electric vehicle (EV) stock a buy? Here's what you should know.

Facing macro headwinds

Higher interest rates and inflationary pressures have had a negative impact on many businesses, and auto makers are no different. In fact, they could be hurt more than most companies out there.

Higher borrowing costs make cars less affordable for consumers. Because of this, Elon Musk decided to implement numerous price cuts last year to boost demand and maintain Tesla's market share. While unit delivery volume remained strong, the company's profitability took a serious hit.

In last year's third quarter, Tesla reported a gross margin and operating margin of 17.9% and 7.6%, respectively, which were both down significantly from the year-ago period. This isn't the trend that shareholders want to see.

Making matters worse, the business is registering a dramatic slowdown in growth. During the third quarter, revenue increased by just 9%, a far cry from the monster growth in previous years. The uncertain economic backdrop will make things challenging in the near term

Tesla's positive attributes

Despite recent headwinds, if you zoom out and focus on the bigger picture, you won't struggle to find reasons to like the company. Tesla has an economic moat that protects its competitive position against rival firms.

One aspect of this is its powerful brand, known for premium, high-quality, and technologically savvy vehicles that consumers pay up for. The other is Tesla's cost advantage, developed from sizable investments over the years to bolster manufacturing capabilities. These positive traits raise the chances Tesla will still be succeeding a decade from now.

The company also has huge long-term ambitions as it focuses on full self-driving capabilities and artificial intelligence. Should Tesla finally introduce autonomous software in its vehicles one day, Musk could realize his goal of launching a global fleet of robotaxis, which could potentially help generate massive revenue and earnings down the line.

Investors face an uphill battle

It's hard to argue against Tesla being a quality business. It's the market leader in a fast-growing industry, the brand is incredibly strong, and profit margins exceed those of traditional rivals. Not to mention the fact that there is added optionality over the long term should Tesla introduce an autonomous robotaxi fleet one day.

Taking all of these things together, one might assume it's wise to rush out and buy the stock. But not so fast. Investors must consider the price they are being asked to pay, which in this case creates an uphill battle to achieve strong returns going forward.

Take Tesla's price-to-earnings (P/E) ratio. As of this writing, it's at 75. This is ridiculously expensive, especially for a company that sports a $733 billion market capitalization and is entering a more mature stage in its lifecycle.

What's interesting is that in the past 12 months, Tesla's P/E multiple has soared 127%. Viewed in context with the trailing year's share-price gain of 95%, this means that the improvement in investor sentiment is what has driven investor returns in recent times.

This demonstrates that perhaps Tesla's stock is priced for perfection right now, resulting in lower odds of producing market-beating returns going forward. Investors who believe in the business should wait for a much better entry price.