Warren Buffett bought seven new stocks in the first nine months of 2022. Tesla (TSLA -0.36%) wasn't one of them. 

That doesn't mean that Buffett doesn't like electric vehicle (EV) stocks. Actually, his Berkshire Hathaway (BRK.A -0.51%) (BRK.B -0.41%) portfolio owns shares of one pure-play EV company and another automaker that's increasing its EV production.

It's safe to assume that the former ranks higher on the legendary investor's list than the latter, since it makes up roughly twice as much of Berkshire's total holdings. This stock is also performing well as of late. Here's why Buffett's favorite EV stock is trouncing Tesla.

Munger's miracle

The stock to which I'm referring is BYD (BYDD.F 4.39%) (BYDDY 3.93%). Berkshire owns 14% of the Chinese EV company. And BYD is on something of a roll. The stock is up close to 5% over the last three months.

That might not seem like much momentum. However, it's important to put BYD's gain into context. The rest of the EV industry has performed atrociously during the same period.

TSLA Chart

TSLA data by YCharts

Tesla is the biggest EV company in the world based on market cap. But its stock is down nearly 50% in recent months. Lucid Group and Rivian Automotive have fallen even more. Nio's loss of more than 20% over the last three months looks somewhat better. However, it still doesn't compare well against BYD's gain.

Berkshire Hathaway's stake in BYD dates back to 2008. Buffett's longtime business partner and Berkshire vice chairman Charlie Munger championed the Chinese EV company. Munger even referred to BYD as a "damn miracle" in an interview with CNBC nearly 14 years ago.

BYD's formula for success

Why exactly is BYD trouncing Tesla? Several reasons especially stand out.

For one thing, there's an important difference between the EVs sold by the two companies. BYD markets both fully electric and plug-in hybrid electric vehicles (PHEVs). Tesla only sells fully electric vehicles. The PHEVs offer greater driving ranges than fully electric EVs do.

Importantly, BYD beats Tesla on price. This makes its EVs more popular in China. Meanwhile, Tesla has been forced to cut the prices for its cars sold in this huge country.

These factors mean BYD is handily outselling Tesla. In 2022, BYD reported sales of 1.9 million electric vehicles. Tesla sold a much lower 1.3 million EVs.

Both companies have faced manufacturing challenges in China due to the COVID-19 pandemic. So far, though, BYD appears to have navigated the issues better than Tesla has.

Looking ahead

It's entirely possible that BYD's advantages could enable it to continue outperforming Tesla. Analysts project significantly stronger growth for the Chinese company over the next five years than they do for Tesla. 

BYD's advantages in China could be key to beating Tesla in the future. The International Energy Administration estimates that the Chinese EV market could still more than triple the size of the EV market in the U.S. by 2030 in one scenario.

However, BYD remains a risky choice for U.S. investors. COVID-19 could still disrupt the company's manufacturing in China. A surge in coronavirus cases could also hurt BYD's EV sales in other markets.

Perhaps with these risks in mind, Buffett has sold BYD shares five times since August. Although Berkshire still maintains a big stake in the Chinese EV maker, it's much smaller than it was previously.

Both BYD and Tesla face the prospects of increased competition. Most of the world's biggest automakers are ramping up their EV production. With this threat, it seems more likely that Buffett could further reduce Berkshire's position in BYD than it is for him to buy shares of either BYD or Tesla in 2023.