Sears shares moved sharply higher Thursday after the department store reported making progress toward stabilizing its business.

The stock was 7.9 percent higher shortly after market opened.

Earlier Thursday, Sears reported a narrower-than-expected loss but said sales continued to erode. The retailer posted a double-digit decline in comparable sales for the second quarter, citing a "retail environment [that] remained challenging, with continued softness in store traffic and elevated price competition."

The department store chain also announced plans to close 28 more Kmart stores this year. That's in addition to the 180 Sears and Kmart stores it has shuttered this year, and the 150 stores it plans to close by the end of the third quarter.

In a bid to return to profitability, the department store chain has been trimming its real estate portfolio, cutting costs and seeking additional liquidity.

"Assets sales proceeds have been key to funding operating cash shortfalls which we expect to be in excess of $1.2 billion this year," Moody's analyst Christina Boni said in a note to clients.

She added that cost saving initiatives "must ultimately be met with stabilization in sales trends."

Sears is attempting this turnaround as other department stores also struggle. Rivals Macy's, Kohl's and J.C. Penney each posted declines in comparable sales for the second quarter, though their losses weren't nearly as steep as Sears'. Falling foot traffic at malls has been a theme across the industry.

Here's what Sears reported compared to what Wall Street was expecting, based on a Thomson Reuters estimate from the one analyst who covers the company:

An adjusted loss of $ 1.16 a share, compared with a forecasted loss of $2.48 per share.

Revenue was $ 4.37 billion, versus an estimate of $4.21 billion.

Same-store sales fell 11.5 percent, worse than the expected 7.1 percent decline.

"We are making progress on the strategic priorities we outlined earlier this year and remain focused on returning our Company to profitability," Sears Holdings CEO Eddie Lampert said in a statement.

"While the third quarter has historically been our most difficult quarter over the past several years, we are working towards making meaningful improvement in our performance this year as a result of the restructuring actions we have put in place."

Net loss attributable to Sears narrowed to $251 million, or $2.34 per share, in the second quarter, from $395 million, or $3.70 per share, one year ago. Excluding one-time charges, the retailer lost $1.16 a share.

Total sales fell to $4.37 billion, from $5.66 billion, primarily driven lower because of recent store closures, Sears said.

Same-store sales — a metric closely watched by the Street for retail stocks — fell 11.5 percent overall for the second quarter. This included a decline of 9.4 percent for Kmart stores, and a decline of 13.2 percent at Sears stores, the company said.

"The fact that they were able to beat earnings estimates, while reporting mediocre revenue ... that was pretty impressive," Greg Portell, a lead partner of A.T. Kearney's retail practice, told CNBC. "It appears they are trending in the right direction, but when will they be able to stop the same-store sales declines?"

Sears added that July was the best month for the quarter for the company in terms of comparable sales, "as the restructuring program actions, including the closing of unprofitable stores, have begun to take effect."

Looking to some of its surviving business segments, Sears said it continues to explore opportunities for its Sears Home Services and Sears Auto Centers, as well as its Kenmore and Diehard brands.

This could include "potential partnerships or other transactions that could expand distribution of our brands and service offerings to realize significant growth," the company said in a statement.

"As much as Sears deserves credit for the various actions it has been taking to shore up the company, there is no denying that this is a miserable set of numbers," GlobalData Retail Managing Director Neil Saunders wrote in a note to clients.

"The bottom line is that as a retail proposition Sears is fundamentally broken."

Meantime, the struggling department store chain has been working to generate additional liquidity and ended the second quarter with $442 million in cash on hand, compared with $286 million at the end of the first quarter.

Sears has used roughly $605 million of its $1.5 billion revolving credit facility due in 2020, with about $191 million still available to borrow.

Sears' total, long-term debt at the end of the latest period was $3.5 billion, compared with $4.2 billion at the end of the first quarter of 2017.

Additionally, the company has reached an agreement with Metropolitan Life Insurance to annuitize an additional $512 million of its pension liability, under which the insurer will pay future pension benefit payments to roughly 20,000 retirees. This will help Sears trim administrative expenses.

"We believe our restructuring program is critical to becoming a more competitive, efficient and agile retailer moving forward," CFO Rob Riecker said on a pre-recorded conference call.

Sears is working toward an ultimate cost-cutting goal of $1.25 billion in fiscal 2017.

Another key area of Sears' business is its real estate. The company said Thursday it will invest more in smaller-format stores that are "focused on our best categories."

"We have a valuable real estate portfolio, which at the end of the quarter comprised of nearly 900 leased as well as over 350 owned stores, many in prominent locations," Riecker said. "We are committed to evaluating strategic options across our real estate portfolio to unlock value from these assets, including in-store partnerships and sub-division opportunities."

Sears added that it has raised $460 million this year from real estate transactions and is targeting $1 billion or more from its assets.

Another focus for Sears has been greater integration with technology. Just last month, Sears said it would begin selling Kenmore-branded and Alexa-enabled appliances on Amazon. The company has said it expects this deal to "significantly expand the reach of the Kenmore brand."

Despite trying to push toward profitability, Sears' deteriorating financial conditions forced the retailer earlier this year to disclose in a filing with the Securities and Exchange Commission that there was "substantial doubt" about its ability to "continue as a going concern."

Met with fears by the Street that a bankruptcy was looming, Sears countered by saying it remained focused on trying to improve its business, saying the language was in adherence to regulatory standards.

Sears and its team of auditors "have a plan, and are executing against it to address those concerns," a company spokesperson told CNBC.

As of Wednesday's market close, shares of Sears have fallen more than 40 percent over the past 12 months. The stock, though, has managed to make up for all of those losses, and more, over the past three months.