2017 was another bad year for mall-based department stores like Macy's (M 2.80%) and J.C. Penney (JCPN.Q). In addition to the mall traffic declines that have been hurting department stores for years, unfavorable weather and the disruption from mass store closures weighed on sales and earnings trends at both companies.

Given this backdrop, it's not surprising that last year's stock market rally failed to lift shares of Macy's and J.C. Penney. In fact, by early November, Macy's stock had lost half of its value, while J.C. Penney shares had tumbled 70%. (Both stocks recouped some of their losses by year's end.)

M Chart

Macy's vs. J.C. Penney 2017 stock performance. Data by YCharts.

However, industry conditions improved significantly in the last two months of the calendar year. As a result, Macy's and J.C. Penney both posted comp-sales growth during the critical holiday season. This should make investors more optimistic about their turnaround prospects.

Modest expectations despite hopeful signs

During the 2016 holiday season, there were no winners among department stores. Comp sales fell 2.1% at Macy's, 2.1% at Kohl's, and 0.8% at J.C. Penney.

Thus, department stores faced easy comparisons during the 2017 holiday season. Furthermore, sales trends across the sector improved significantly beginning in the second half of October. Nevertheless, Macy's and J.C. Penney both stuck to cautious sales forecasts when they reported their third-quarter results in early November.

Macy's official forecast called for Q4 comp sales (including licensed departments) to be between minus 1.9% and a 1.1% gain. However, on the company's Q3 earnings call, CFO Karen Hoguet told investors that sales would likely be near the low end of that range. Meanwhile, J.C. Penney's guidance for a full-year comp sales dip of 0%-1% implied a Q4 comp sales decrease of 1% at the low end of the range and an increase of about 2% at the high end.

The exterior of a J.C. Penney store

Macy's and J.C. Penney began the holiday season with conservative sales forecasts. Image source: J.C. Penney.

A return to comp sales growth

The early numbers from Macy's and J.C. Penney are quite good. On Thursday, Macy's reported that comp sales increased 1.1% for the retail months of November and December (which generally account for about 80% of fourth quarter sales). J.C. Penney posted even stronger results, with comp sales up 3.4% during the same period.

If these comp sales trends were to continue in January, Macy's would reach the high end of its sales guidance range, and J.C. Penney would exceed its sales guidance. That said, comp sales trends will probably slow this month. Strength in holiday season sales typically means that there is less clearance inventory to sell in January. (That's still a good thing in terms of maximizing profit, as clearance sales carry low margins.)

Following its sales update, J.C. Penney maintained its full-year guidance. However, this may reflect management taking a conservative stance after having been forced to cut its guidance multiple times during 2017. By contrast, Macy's raised its full-year adjusted EPS forecast from $2.91-$3.16 to $3.11-$3.21, including a $0.05 benefit from tax reform.

This is a great sign for 2018

Some pundits weren't impressed by these comp sales gains. For example, Neil Saunders of GlobalData Retail noted that Macy's 1.1% comp sales growth was significantly less than the retail industry average, even though the company faced an easy year-over-year comparison.

That said, this 1.1% comp sales increase represented a remarkable improvement relative to the 3.6% comp sales slump that Macy's reported for the first nine months of the fiscal year. It's also noteworthy that Macy's had faced even easier comparisons earlier in the year, as comp sales dropped by 3.5% in the first nine months of 2016. Finally, Macy's holiday season comp sales increase came despite a credit card glitch that hurt sales in the afternoon on Black Friday.

The improving sales trends at Macy's and J.C. Penney also bode well for 2018. Both retailers will face easy year-over-year comparisons for the first three quarters of the coming fiscal year. Additionally, the recently enacted tax reform bill will put more money in the pockets of Macy's and J.C. Penney's core customers, which could provide an incremental sales boost. (Macy's will also see a big decrease in its tax bill due to corporate tax reform.)

Macy's stock is extremely cheap right now. Even if adjusted pre-tax profit just stays flat in 2018, earnings per share could rise to nearly $4 due to tax savings. Macy's shares trade for barely more than six times this figure -- making the stock very attractive for value investors.

J.C. Penney is a more speculative investment, as its profit margin has been around zero recently. However, it trades for 0.1 times sales, whereas even Macy's (which seems quite undervalued) trades for 0.3 times sales. This indicates that there could be a ton of upside for J.C. Penney stock in 2018 if the company can maintain its recent comp sales momentum while also starting to improve its profit margin again.