Tesla (TSLA 1.85%) is one of the 10 largest listed companies in the world by market capitalization. That's amazing for a company that -- just a few years ago -- appeared to be going bankrupt. So how did we get here?

The short answer is that Tesla surged over 700% in 2020, thanks to love from retail investors and the stock's inclusion in the S&P 500. And judging from Tesla's index-beating returns in 2021, investors are eyeing another year of record production figures and souped-up new models. But by jumping in at the deep end, they are ignoring huge risks.

Don't get me wrong, though: I have a strong admiration for Tesla and Elon Musk, especially if we consider what Tesla has achieved so far. I would even consider buying the stock -- if these two things happen.

Woman looking thoughtful

Image source: Getty Images.

1. Tesla continues to execute

Tesla's early foray into electric vehicles (EV) has definitely paid off. Against all odds, Tesla is now a leader in a fast-growing industry that's upending the automotive business. For that, credit goes to visionary CEO Elon Musk -- who led Tesla through hell and back. 

Tesla sold more than 367,500 cars in 2019, about 18% of global EV sales. In 2020, it delivered 499,550 cars, 36% more than it did in 2019. That was impressive -- considering the disruptive effect of COVID-19 on global supply chains.

But Tesla risks becoming a victim of its own success. Hungry for some EV action, traditional automakers like Toyota (TM 0.05%), General Motors (GM 4.37%), and Ford (F 0.47%) are investing billions of dollars into potential Tesla killers. It has also paved the way for EV upstarts like NIO (NIO 0.25%) and XPeng (XPEV 2.87%) to attract a flood of growth capital.

Last month, BYD (BYDDY -2.62%) -- a pioneering EV player backed by Warren Buffett -- raised almost $4 billion for working capital and research and development of new models. Not only has BYD been selling EVs since 2008, it also makes its own batteries.

The bottom line is that competition in EVs is heating up like never before. To fend off its growing number of rivals, Tesla needs to execute flawlessly -- or risk being left in the dust.

Beyond EVs, Tesla is charging into self-driving cars and robotaxis. While both industries are still in their early days, Tesla bulls are already betting the company will lead those markets too.

But before I invest, I need to see Tesla keep ramping EV production and at least sustain its market share -- while also growing its newer businesses.

2. A reasonable entry price

Let's face it: Tesla stock is just too expensive. 

At $781 a share, Tesla has a market capitalization of $750 billion. For perspective, the combined market value of General Motors, Ford, Toyota, Volkswagen, Stellantis, and BYD is less  than $650 billion!

Many argue Tesla's enormous valuation is justified once you take into account its potential in renewable energy, autonomous vehicles, and other markets. Tesla also has something its rivals don't have -- Elon Musk. But given that Tesla's other projects are still in early stages, it may be years before they live up to the CEO's promises.

I agree that Tesla has bright prospects. But I think Tesla bulls are overly optimistic to a fault. They've priced in all of the upside, and none of the downside. Investors should note that until its newer businesses take off, Tesla remains very much a carmaker -- and subject to the many risks carmakers face. 

In the meantime, it's hard to justify buying Tesla stock at its current price of 24 times sales. That's just too high, considering General Motors trades at less than one times sales. 

When will I buy Tesla?

I think Tesla is one of the most incredible companies of our era. And there's a big chance Tesla will extend its leadership in the EV space to other lucrative industries, such as renewable energy and robotaxis. 

But what if this all turns out to be wishful thinking? 

First of all, there's no guarantee Tesla will remain the leading EV player in years to come. We also don't know if Tesla's other ventures will be a success.

What we do know is that Tesla is trading at a ludicrous valuation -- it's among the top 25 most expensive U.S. stocks with a trailing price-to-earnings ratio of over 1,100. Such valuation leaves no room for error for Tesla, and no margin of safety for investors.

So until Tesla's stock price gets a whole lot more attractive -- and until I'm more confident about its ability to execute -- I will just watch the company from the sidelines.