Chinese electric-carmaker NIO (NYSE:NIO) has been on a tear: The company's stock has gained almost 180% since the beginning of June, as investors hoping to find the next Tesla (NASDAQ:TSLA) have piled into its U.S.-traded American depositary shares.

Sounds great, doesn't it? But take a look at NIO's performance since the beginning of June. Something changed last week.

NIO Chart

NIO data by YCharts.

NIO's shares lost almost 26% of their value last week, and it wasn't because of any negative news (because there wasn't any negative news). What happened, and what does it mean for auto investors holding the shares?

NIO's rally didn't come out of nowhere

To some extent, NIO's rally has been powered by investors hoping that it will replicate Tesla's huge run-up, but we should start by acknowledging that it was ignited by real news that changed the company's story for the better. Let's review.

NIO started 2020 in a tough spot, dangerously short of cash and facing a sales slump amid the COVID-19 outbreak in China. At that point, NIO's story was all about survival: Would the company manage to stay afloat? 

Enter the plot twists:

Last year, NIO spent aggressively on expanding its sales and distribution network in China (too aggressively, some analysts thought at the time.) That spending is one reason why NIO was in a cash crunch as the year started -- but the expanded network was a big contributor to NIO's impressive second-quarter sales growth.  

That was one more plot twist: A series of management decisions that looked kind of crazy a year ago now look prescient. 

That's why NIO's stock has run up over the last couple of months. But why did it decline last week?

A blue NIO ES8, an upscale seven-passenger electric SUV.

NIO overhauled its flagship ES8 SUV earlier this year, and sales have jumped. Image source: NIO.

NIO's story hasn't changed, but this has

Goldman Sachs analyst Fei Fang has released three notes on NIO since the beginning of June. I think a quick review of Fang's notes will help us understand why the stock turned lower last week.

  • On June 3, Fang raised his rating on NIO's shares to buy, from neutral, with a price target of $6.40. Noting that NIO had raised money and greatly reduced its cash-burn rate, Fang argued that with the company's sales up 37% year-to-date through April and on track to more than double in the second quarter, NIO had earned a buy rating. (NIO closed at $5.60 on June 3.)
  • Three weeks later, on June 24, Fang cut NIO's rating to hold, while raising his price target to $7.00. Noting that NIO's share price had risen about 50% since his June 3 note, he said that while his expectations for NIO hadn't changed, the company's stock looked fully valued. (NIO closed at $6.86 on June 24.)
  • Just over three weeks later, on Friday (July 17), Fang cut his rating on NIO's stock again, to sell, while reiterating that $7.00 price target. Again, his reasoning was simple: With shares up 89% in the past month, the price reflected "over-optimism," or an unrealistic view of NIO's prospects. NIO closed at $11.09 on July 17, down from $12.94 the day before. 

To sum up: Fang's take, which I agree with, is that the company's story hasn't really changed since early June. If anything, it looks a little better now that we've seen the second-quarter sales results.

NIO is still on a solid growth path with plenty of cash in the bank. But investors' enthusiasm pushed NIO's stock price above what is realistic given the company's prospects -- and challenges -- right now.

Notwithstanding Fang's latest rating, I don't think there's any reason for long-term-minded investors to sell the shares in the near term. But I do think that what we saw last week was a needed correction, and I wouldn't be surprised if NIO's shares decline a bit further before settling down.