Investors were apparently pleased with Tesla (TSLA -5.59%) CEO Elon Musk's update on the electric-car and sustainable-energy company's business last week during Tesla's annual shareholder meeting. The stock's relentless surge this year persisted, ending the week up 3.7%. And the stock's gain has continued this week, with shares up more than 3% on Tuesday at this writing.

While Tesla's roaring stock price has attracted lots of attention recently, as the company became more valuable than both Ford (F -3.01%) and General Motors (GM -0.91%), Tesla's value has now surpassed yet another competitor: BMW (BAMXF 1.97%).

Tesla vehicles at a Tesla Supercharger location

Image source: Author.

Last Friday, Tesla's market capitalization was briefly worth about half a billion dollars more than BMW. But later in the trading day, Tesla stock gave up its gain and subsequently saw its market capitalization fall behind BMW again. On Tuesday, however, Tesla's market cap surpassed BMW once more. At the time of this writing, Tesla is worth about $61.1 billion and BMW is worth approximately $60.7 billion.

What's driving Tesla stock higher?

Tesla stock's recent rise follows the recent shareholder meeting at which Elon Musk not only reaffirmed Tesla's timeline for a July launch of its Model 3, but also expressed confidence in other upcoming products; these include a Tesla semi, Model Y, and possibly even a still unannounced product that could be unveiled this year.

Tesla Model Y teaser image

Tesla Model Y teaser image. Image source: Tesla.

The big near-term milestone for Tesla to hit, of course, is the company's aggressive target for Model 3 production. On the back of hundreds of thousands of deposit-backed Model 3 reservations, Tesla hopes to build 500,000 vehicles next year -- a massive jump from the 84,000 vehicles the company produced in 2016. As the Model 3's launch nears, Tesla continues to believe it can achieve this level of production. This confidence so close to the launch may be helping investor confidence in the company.

Think twice before you buy this hot stock

But investors should think carefully before they buy Tesla stock just because it has been an outperformer recently. The high stock price has priced in significant growth for years to come. Even more, given that Tesla isn't regularly reporting profits yet, Tesla's valuation assumes that the company can eventually garner profit margins akin to BMW.

BMW's profit margins aren't typical of automakers. The company has a gross profit margin of about 20% and a net profit margin of about 8%. These figures compare to gross and net profit margins of about 16% and 2%, respectively, for Ford, and 13% and 6% for General Motors.

Tesla's gross profit margin -- at about 24% -- has already surpassed BMW, General Motors, and Ford. But Tesla's aggressive expansion of its retail, service, and charging network, as well as ongoing expansions of factories and production capacity, has it losing hundreds of millions of dollars every year after accounting for operating expenses. On $2 billion of gross profit in the trailing 12 months, Tesla lost $723 million. Furthermore, since the Model 3 will have a starting price about half that of its Model S and Model X, the company's gross profit margin is likely to take a hit -- especially in the near term.

TSLA Gross Profit (TTM) Chart

TSLA Gross Profit (TTM) data by YCharts.

Over the long haul, Tesla believes even its Model 3 can achieve a lucrative gross profit margin, similar to its gross margin for its Model S and X vehicles. But this has yet to be seen.

Ultimately, Tesla does look poised for sales to soar as it brings new vehicles to market. But producing them in mass-market numbers will be a new test for the company, so investors should be careful to consider this risk in their thesis for the stock. While I won't be selling my Tesla shares, I also don't plan to buy Tesla stock at this level.