In November, struggling department store operator J.C. Penney (NYSE:JCP) projected that it would continue its gradual recovery in Q4 with a strong improvement in gross margin and 2-4% comparable-store sales growth.

On Tuesday afternoon, J.C. Penney confirmed that it will be able to deliver on its promises for the all-important holiday shopping season. Comparable-store sales rose 3.7% during the combined November-December period. As a result, J.C. Penney now expects comparable-store sales growth for the full quarter to approach the upper end of the guidance range (i.e., 4%). 

Better performance than feared
Just this week, highly respected retail analyst Charles Grom wrote that J.C. Penney was at risk of missing its guidance for 2-4% Q4 comparable-store sales growth. Grom noted that J.C. Penney's sales trajectory improved significantly from Q3 2013 to Q4 2013, making comparisons much more challenging this quarter.

Retail analysts have been worried about J.C. Penney's sales trends. 

Furthermore, retail sales for the Black Friday shopping weekend came in fairly weak, despite typically being a key sales weekend for retailers like J.C. Penney. Many retail experts argued that the Black Friday sales estimates might not be representative of holiday season sales as a whole, but plenty of investors were worried nonetheless.

So when J.C. Penney announced that its holiday season sales actually came in near the high end of the guidance range, investors piled back into the stock. As of 1 p.m. on Jan. 7, 2014, J.C. Penney shares had surged 20% to nearly $8.

A long way to go
While J.C. Penney has taken a big step in the right direction this quarter, it still has a long way to go to become a healthy retailer again. It's important to recognize that J.C. Penney achieved its holiday season sales targets in the context of a strong consumer spending environment. Gas prices are down significantly while U.S. economic growth is picking up.

In other words, J.C. Penney achieved solid sales growth at a time when most retailers should be posting good results. Indeed, the National Retail Federation has estimated that 2014 holiday retail sales will rise 4.1% year over year. J.C. Penney could fall on tough times again when the next consumer spending slowdown occurs.

Furthermore, even with sales coming in ahead of expectations, J.C. Penney won't post a big profit this quarter. Based on the updated sales guidance, J.C. Penney's Q4 EPS could reach $0.15-$0.20, excluding any unusual gains or expenses. That's above the current average analyst estimate of $0.07, but still a far cry from the $1.09 per share it earned in Q4 of FY10.

While J.C. Penney will probably be profitable in Q4, it will still post a big annual loss. 

A small profit in Q4 (always the most profitable quarter for retailers) is a step in the right direction, but nothing more. It will still leave J.C. Penney with a massive loss for the full year. Through the first three quarters of FY14, J.C. Penney had posted an adjusted loss of $816 million, or $2.67 per share.

For J.C. Penney to hit its long-term targets and return to profitability by 2017, it will need to maintain a 4% comparable-store sales growth rate between now and then.

The company's solid Q4 performance shows that it might be able to pull off this feat. However, just a quarter earlier, J.C. Penney posted flat comparable-store sales. Given the inconsistency of J.C. Penney's recent results -- and the reality that comparisons will get tougher with each quarter of sales growth -- achieving three years of 4% comparable-store sales growth will be challenging.

J.C. Penney is definitely in better shape today than it has been for the past three years. That said, it remains a very risky stock relative to its potential upside. Off-price retailers are likely to continue taking share from department stores in the long run, and these companies will probably be better long-term investments.