The past few weeks have been rough for Dangdang (DANG) shareholders.

Shares of the Chinese online retailer have shed nearly a quarter of their value since posting quarterly results last month.

It wasn't a bad report. Revenue climbed a better-than-expected 24% and the e-tailer's loss of $0.13 a share was narrower than the deficit Wall Street was modeling. Dangdang's top-line guidance for the current quarter was also ahead of where analysts were perched.

However, that didn't stop investors from bailing on the stock. That also didn't sway JPMorgan Chase away from downgrading Dangdang last week. The analysts are concerned about the competitive nature of China's evolving online retail market, fearing that margins will be kept in check through at least the next year or two. That's bad news for Dangdang as it's still struggling to become a profitable company.

There are a few publicly traded e-tailers in China making money, but they don't follow Dangdang's model. LightInTheBox (LITB) may be based in China, where it sources most of its wares, but more than 80% of its sales are taking place outside of Asia.

Vipshop (VIPS -0.30%) is also growing profitably, but it's a daily deals leader. As a flash sale website operator, Vipshop's margins will naturally be healthier than Dangdang as it stocks up on closeouts and other deals that it can unload at higher markups. Vipshop's gross margins of 23.5% in its most recent quarter are comfortably ahead of Dangdang's 17.1% showing.

In fact, while JPMorgan was downgrading Dangdang, it was actually issuing a bullish note on Vipshop. The analysts feel that the climate of Vipshop's niche -- and its leadership within the flash sales market -- make it a compelling buy.

JPMorgan may be right about the difficult path that Dangdang has on the way to profitability, but margins are improving. It's also important not to read too much into the stock's recent slide. If we go back to when the shares bottomed out at $3.70 in April, Dangdang's stock has gone on to more than double.

Dangdang may need more than narrowing deficits to win back investors. If it can't get sales growth to accelerate -- and Vipshop and LightInTheBox are growing a lot faster than Dangdang -- an actual push into profitability could do the trick. 

We'll have to wait more than two months for the next Dangdang update, but keep an eye on the stock. A big reason for the sell-off over the past two weeks is that the shares had more than doubled since its previous report. Blowout results were baked into the appreciating shares. If Dangdang's stock is still in the single digits by the time it reports again in mid-November, it wouldn't be a surprise to see the shares move higher on decent results.

Dangdang is growing, and its margins are improving. The stock just got a little ahead of itself this summer, but the climate is more forgiving now.