This story has been updated from 9:26 a.m. EST wiith additional analysis.

NEW YORK (TheStreet) - J.C. Penney (JCP) - Get Report shares surged on Wednesday after investors cheered the much-maligned retailer's expectations for improved sales and margin trends in the fourth quarter, suggesting that the worst could be behind it.

"The Q3 results and Q4 guidance that J.C. Penney reported today suggest that a turnaround at the chain continues to take hold," Oppeneheimer analyst Brian Nagel wrote in a research note. Nagel has a "perform" rating on the company.

"Comps are improving albeit against easing comparisons. Clearance activity is moderating and turning less of a drag on margins. JCP is more aggressively controlling costs and preserving capital," Nagel wrote. "We are optimistic that trends at the chain should continue to improve as JCP further pursues its 'back to basics' strategy and distances itself from prior, very disruptive, repositioning efforts. JCP is, however, by no means out of the woods. Per our math, sales still need to improve meaningfully in order to take the risk of another capital raise off the table."

J.C. Penney CEO Mike Ullman says the company is encouraged by November sales so far.

Early Wednesday, J.C. Penney reported a net loss of $489 million, or $1.94 a share, for the quarter ended Nov. 2. The loss includes 18 cents of restructuring and management transition charges, 4 cents related to primary pension plan expenses and a 9-cent net gain on the sale of a non-operating asset, and a 73-cent loss associated with tax valuation allowances, the company said.

The adjusted loss was $457 million, or $1.81 a share, which includes the loss associated with the tax valuation allowances, but excludes the other one-time items.

Analysts, according to Thomson Reuters, expected J.C. Penney to post a loss of $1.77 a share.

J.C. Penney reported net sales fell 5.1% to $2.78 billion, in the Nov.2-ending quarter, better than the 12% slide during the department store chain's second quarter, but just shy of analysts' estimates calling for sales of $2.79 billion.

Sales on jumped 24.5% for the quarter to $266 million.

Women's apparel, men's apparel and fine jewelry were the company's top performing merchandise divisions.

Comparable-store sales declined 4.8% for the quarter, but represented "a sequential improvement of 710 basis points" when compared to the second quarter. J.C. Penney had previously announced that October same-store sales rose 0.9%, the first time they did since December 2011.

Gross margin in the third quarter fell to 29.5% of sales, compared to 32.5% in the same quarter last year, "negatively impacted by lower clearance margins due to the overhang of inventory from the first two quarters of the year, higher levels of clearance units sold, as well as the company's transition back to a promotional pricing strategy as compared to last year's strategy," but it did improve sequentially throughout the quarter, the company said.

The company expects fourth-quarter comps and gross margin to improve sequentially and year over year. It expects total available liquidity to be more than $2 billion at year end.

Shares were surging 7.5% to $9.36 on Wednesday, with strong trading volume of more than 63 million shares. The company's three-month daily trading average is slightly above 40 million shares, according to Yahoo! Finance.

TST Recommends

Comments made on Twitter noted specifically the move by J.C. Penney to repay $200 million of its revolving credit facility, which disputes the argument that the company should or would file for bankruptcy.

"Bankruptcy really came off of the table once Penney did the equity offering. And, as you can see from the numbers just released, they only really needed the equity offering as a hand-holding measure, they did not really need the money. Now, with sales turning positive, the 'bankruptcy' shorts should start heading for the exits," retail expert Jan Rogers Kniffen said in an email. But the question remains "how long can Penney run a positive comp and at what gross margin?" he asked.

Kniffen speculated that there is room for the company to experience positive comp sales at least into 2015. Kniffen specifically predicted a "high single digit comp" for J.C. Penney's fourth quarter, even with the strong competitive holiday selling season.

"The short-term turnaround is certainly in place," he said. "Long term? Who knows? But, who invests for the long term anymore?"

Cash and cash equivalents at the end of the third quarter were $1.23 billion. The company's total available liquidity, which includes cash and cash equivalents as well as the availability under the company's revolving credit facility, was $1.71 billion at quarter end.

"Our strategies to reconnect with customers are beginning to take hold, and this became increasingly clear as the quarter progressed," Myron E. (Mike) Ullman, J.C. Penney's CEO said in the earnings statement. "This is the result of the tremendous efforts of the associates across our company to restore the merchandise customers want and deliver an unmatched shopping experience. We are proud of the company's October sales performance, encouraged by the early weeks of November, and believe we are making strides toward a path to long-term profitable growth."

Ullman said on the call that the company is ready for Thanksgiving weekend. J.C. Penney plans to open at 8 p.m. on Thanksgiving.

"Starting this week you will see a new clever marketing campaign that we believe will break through the noise" of a "fiercely competitive holiday season," Ullman said on the call. With appropriate merchandise and marketing, he expects the company to "win in more than our fair share."

Still more than one observer remains pessimistic on the stock.

"We do not believe these results are anything to be excited about. Despite management's positive tone about some its initiatives, we believe the hole they are in is just too deep. If they recaptured 50% of its lost sales, got back to 2011 [gross margin] levels and didn't have to spend another SG&A dollar beyond 2013 levels, we estimate they would lose" 42 cents a share, wrote Wells Fargo Securities analyst Paul Lejuez in a research note on Wednesday.

Lejuez rates the company at "underperform."

Brian Sozzi, CEO and chief equities strategist at Belus Capital Advisors, said the markets' reaction to J.C. Penney's stock compared to what happened in its earnings report is in opposition.

"J.C. Penney the company very much remains in dire straits, but J.C. Penney the stock has detached from the financials," Sozzi wrote in an email. "The only thing Mr. Market is looking at are the directional positive changes in the business and then rationalizing J.C. Penney turns a profit in the final quarter of 2014 (yes, 2014)."

Sozzi has a "sell" rating on J.C. Penney.

- Written by Laurie Kulikowski in New York.

Disclosure: TheStreet's editorial policy prohibits staff editors, reporters and analysts from holding positions in any individual stocks.