Image source: The Motley Fool.

Macy's (M 1.19%), Nordstrom (JWN -0.69%), and Kohl's (KSS 6.51%) reported earnings for the second quarter of 2016 last week, and the market welcomed their explosive gains.

M Price Chart

M Price data by YCharts

However, that doesn't necessarily mean the worst is in the past for department-store investors. Far from it, in fact. Here's why.

Less bad is the new good in retail

Department stores are facing tremendous competitive pressure from online retailers. The trend has been in place for several years now, and Wall Street analysts were already expecting declining revenues from companies in the sector during the second quarter of 2016. 

Financial figures were somewhat better than feared, and key companies in the industry are taking the right steps to adapt to a challenging environment. On the other hand, sales are still moving in the wrong direction, and that's a major risk to consider.

Macy's announced a 3.9% decline in revenue last quarter, while comparable sales on an owned-plus-licensed basis fell 2%. On a similar tone, management expects comparable sales during the full year 2016 to decline by 3% to 4% from 2015 levels.

Macy's is taking the bull by the horns and substantially reducing its store count, and that move is one of the main reasons for optimism among investors in the company. Macy's will be closing 100 of its full-line stores in the coming months, a nearly 15% reduction from the 675 full-line stores currently in operation. According to management, other players in the industry should move in the same direction, as changing shopping habits mean there are just too many stores out there.

Total revenue at Nordstrom fell 0.2% last quarter, on the back of a 1.2% decline in comparable-store sales. Profit margins are declining because of increased inventory markdowns and a higher impact of fixed costs on a declining revenue base, with the result that net income fell 45% year over year.

Nordstrom isn't planning to close any stores this year, but the company is aggressively working to realign inventory and reduce expenses across the board. At the same time, Nordstrom is accelerating its investments in technology, supply chain, and marketing to boost online sales. The company revamped its mobile app last quarter and will offer new omnichannel functionalities in the fall, including the ability to reserve merchandise online and then try it at the stores.

In March, Kohl's announced 18 store closings. The company isn't planning any more closings in the coming year, but sales are still declining, both in total revenue terms and on a same-store-sales basis. Kohl's produced $4.2 billion in revenue during the quarter ended on July 30, a 2% decline year over year. Comparable-store sales fell 1.8% during the period. 

Kohl's CEO Kevin Mansell was quite straightforward in his assessment of the company's performance during the second quarter: "Our sales improved over our first-quarter results but were below our expectations." 

Putting performance in perspective

Considering that the industry is facing massive headwinds, it's good to see that department stores are reducing capacity, cutting costs, and trying to expand their online presence. It won't be easy for these companies to jump-start growth, but acknowledging difficulties is a necessary first step toward finding a solution.

Nevertheless, it's important to exercise caution when analyzing the sector. Even after producing big gains over the past week, shares of Macy's, Nordstrom, and Kohl's are still down considerably over the past year, declining by 36%, 31%, and 20%, respectively. There is considerable pessimism incorporated into their stock prices.

The following chart shows price-to-sales ratios for the three companies. They're all trading near the low end of their valuation range over the past five years. Historically low valuations reflect the fact that investors have depressed expectations for department stores, and a low bar is relatively easy to beat. 

M PS Ratio (TTM) Chart

M PS Ratio (TTM) data by YCharts

At the end of the day, it all comes down to performance versus expectations. Macy's, Nordstrom, and Kohl's reported financial figures that weren't as bad as analysts expected during the second quarter, fueling a short-term rally in department-store stocks. 

However, the fact that they managed to outperform undemanding expectations last quarter doesn't say much about these companies and their potential returns going forward. If they're going to deliver sustained gains over the middle term, department-store operators need to find a way to stabilize profit margins and reverse the declining revenue trend. 

It's hard to tell when or how this is going to happen, so investing in companies such as Macy's, Nordstrom, and Kohl's is quite a risky proposition at this stage.