Many investors are shying away from the automotive industry as the two largest markets, the U.S. and China, post slowing overall sales. But don't overlook the fact that electric vehicles continue to gain market share and what that could do for certain companies and their stocks.

One compelling company, albeit a young and risky one, is NIO (NIO -4.48%), a manufacturer of premium electric vehicles (EVs) in China. As the country's government continues to heavily push EVs as a way to relieve massive pollution problems, companies like NIO have compelling potential to thrive long term.

But 2019 has been a large speed bump for the company, due to factors we'll cover in a moment. Yet that hasn't stopped it from notching a huge win recently, which should have investors hopeful.

Why was 2019 disappointing?

NIO has an intriguing growth story as the global EV market is projected to grow from roughly 3.27 million units in 2019 up to 26.95 million by 2030 -- a 21.1% compound annual growth rate. And while that sets the stage for NIO to reward long-term investors, the company's performance has been hindered in 2019 by trade tensions, reduced EV subsidies in China, first-quarter results that checked in below estimates, and gloomy short-term guidance.

On top of all that, rival Tesla recorded a nearly 42% jump in its China revenue to almost $1.5 billion in the first half of 2019.

As NIO has accelerated through the speed bump that is 2019, its stock price has tumbled 52% year to date. Investors were in need of a pick-me-up, and it appears they recently received exactly that.

Control what you can control

While NIO can't control escalating trade tensions between the U.S. and China, or the government's decision to reduce EV subsidies, it can make sure it produces a high-quality vehicle that will attract and retain consumers.

And it appears to be doing that: NIO ranked the highest in J.D. Power's inaugural China New Energy Vehicle Experience Index Study. That may be a mouthful, but essentially it measures new-vehicle quality by tracking problems reported by owners during the first two to six months, and ranks them by the number of problems per 100 vehicles. The lower the number per 100 vehicles, the higher the quality.

NIO's ES6 electric SUV parked

NIO's ES6 SUV. Image source: NIO.

NIO ranked the highest in J.D. Power's study with a score of 67 per 100 vehicles, trailed in the distance by BMW with a score of 82 per 100 vehicles, and then two well-known Chinese automakers, Chery Automobile and GAC Motor, tied for third place with a score of 84. NIO's ranking amid its domestic competition is particularly impressive since Chinese automakers averaged a score of 90 per 100 vehicles, the worst combined score.

Investors might be quick to brush this study off, but it is incredibly important for NIO's bull thesis, as the EV maker is clearly producing higher quality vehicles.

Why this matters

Here's the predicament EV makers in China face. While the government continues to encourage EV sales, it also believes the industry is closer to supporting itself, so it is dialing back subsidies that made EVs more affordable. Reduced subsidies will hurt demand temporarily, but it also changes the dynamics in the market that should absolutely favor NIO.

China's EV market is booming. Over 486 ambitious EV companies have popped up, and BloombergNEF estimates that they have raised $18 billion since 2011. China is now considering rules and barriers to make it more difficult to enter the market. Thinning competition will help NIO, and the companies that thrive amid increasing barriers will be the EV makers that produce high-quality vehicles.

J.D. Power just gave NIO a big boost in credibility, especially since high quality will be important for the segment to continue taking market share from combustion engine vehicles. 

"New-vehicle quality, as one of the most important elements for product competitiveness and consumers' purchase decision, largely determines which side consumers will prefer when making choices between fossil-fuel vehicles and new energy vehicles." said Jeff Cai of J.D. Power China in a press release. 

2019 has certainly been disappointing for investors in NIO. But at least the company is designing and producing quality vehicles. Management plans to roll out a new vehicle annually for the foreseeable future, while giving face-lifts to aging models. If the company continues to impress with quality, the future is still bright for those who can stomach the risks of investing in a young and volatile company.