Despite a worse-than-expected decline in sales, Sears (SHLD) narrowed its second-quarter loss on Thursday and matched Wall Street expectations, sending its shares more than 5% higher in morning trade.

The ailing Hoffman Estate, Ill.-based retail giant reported a loss of $132 million, or $1.25 a share, compared with a year-earlier loss of $146 million, or $1.37.

Excluding one-time items, Sears posted a loss of 86 cents, matching average analyst estimates in a Thomson Reuters poll.  

Revenue for the three months ended July 28 was $9.47 billion, down from $10.14 billion a year ago, missing the Street’s view of $9.63 billion, which the retailer said was partially a reflection of having fewer Kmart and Sears full-line stores in operation, as well as softer demand for electronics, lawn and garden products and drugs.

Sears reported a 2.9% decline in domestic comparable sales – a key growth metric for retailers that measures sales at stores open longer than a year. Those sales at its Kmart retail chain fell 4.7%, while comparable sales at Sears Canada declined by 7.1%, which the company said was a reflection of unfavorable foreign exchange rates.

Earnings were cushioned by tighter costs, as the retailer continued to spin off businesses and shed assets to narrow expenses and streamline the business.

"We continue to make progress against the priorities we outlined in our fourth quarter earnings release and call,” Sears CEO Lou D'Ambrosio said in a statement. “We have improved our profit position, as we reduced expenses and expanded margin rate through more effective promotional design.”

As part of those efforts, Sears Hometown and Outlet stores earlier this week began the process of filing for an initial public offering.  The subsidiary said it will operate as a business within Sears Holdings but as an independent public company.

Financial terms of the spinoff were not disclosed, however the company did say that Sears Chairman Edward Lampert’s ESL Investments is expected to own at least 62% of the new company.

The overhaul plan is an effort to stem bleeding sales. Sears has reported a decline in sales every year since 2005, ever since Sears merged with Kmart in an $11 billion deal.

Shares of Sears climbed about 5.6% higher Thursday to $59.80, bringing their percentage gain since January to about 88%.

Follow Jennifer Booton on Twitter at @Jbooton