Last Wednesday, Macy's (M -2.26%) reported surprisingly strong sales and earnings results for the first quarter of fiscal 2018. This big earnings beat helped investors gain confidence in the retailer's turnaround effort.

A day later, Macy's smaller rival Dillard's (DDS 0.84%) followed with its own solid earnings report. The better-than-expected results and a recent analyst upgrade have helped power a roughly 13% rally in Dillard's stock over the past week.

DDS Price Chart

Dillard's Stock Performance, data by YCharts.

However, Dillard's earnings recovery is likely to be less durable than that of Macy's, because it depends primarily on a recovery in consumer spending. By contrast, Macy's has been making big investments in order to drive more customers to its stores and e-commerce site, which could drive a more sustainable upturn in its business.

Another quarter of comp sales growth

In the first quarter, Dillard's achieved a 2% increase in comparable-store sales. Total revenue rose 2.6% to $1.49 billion. This marked the company's second consecutive quarter of positive comp sales, following a long stretch of comp sales declines.

Dillard's recent sales trajectory has roughly mirrored that of Macy's. Last quarter, Macy's posted a 4.2% increase in comp sales, but that comp sales gain would have been approximately 1.7% excluding a shift in the timing of a major promotional event. This was also the second straight quarter with a comp sales increase for Macy's after a long dry spell.

The solid comp sales results -- along with tax savings related to the tax reform legislation passed in late 2017 -- drove big increases in earnings per share (EPS) for both Dillard's and Macy's. Dillard's EPS surged 36% year over year to $2.89. Meanwhile, Macy's reported that adjusted EPS nearly doubled last quarter, rising from $0.26 to $0.48.

The exterior of a Dillard's store

Dillard's reported a second straight increase in comp sales and EPS last quarter. Image source: Author.

Signs of a shaky recovery at Dillard's

While Dillard's reported a nice improvement in sales and earnings last quarter, two aspects of the company's performance are somewhat troubling.

First, Dillard's EPS growth was driven entirely by the lower tax rate and the impact of stock buybacks, which reduced its share count. Indeed, pre-tax income inched up less than 1% year over year (from $102.5 million to $103.2 million) and Dillard's first quarter pre-tax margin slipped to 7.1% from 7.2% a year earlier. By contrast, Macy's profit margin surged last quarter, particularly if asset sale gains are excluded.

Second, Dillard's ended last quarter with inventory up 4% year over year, compared to down 6% for Macy's. Strong inventory management helped Macy's improve its gross margin last quarter, whereas Dillard's retail gross margin decreased by about 0.3 percentage points. High inventory levels may put pressure on Dillard's gross margin again in the second quarter, especially if there is a blip in consumer spending at any point in the next few months.

Macy's is investing to maintain its trajectory

The biggest reason for investors to be wary of Dillard's stock is that for many years, management hasn't invested much money in the business. Macy's spends about $1 billion a year on capital expenditures, compared to a typical range of $100 million to $150 million for Dillard's. While Macy's is a larger company, that only accounts for a portion of this discrepancy.

Macy's is using its massive capital spending budget to invest in multiple initiatives that could drive a durable sales and earnings recovery. For example, it will add Macy's Backstage off-price sections in another 100 full-line stores this year. The company has found that doing so lifts total sales in those stores by about 7 percentage points. Macy's is also investing in its website and mobile app, augmented reality and virtual reality technology for its furniture department, mobile checkout, and an upgraded loyalty program.

Dillard's seems to be taking a much more passive approach. Its main capital allocation priority has been share repurchases: The company has spent at least $200 million on buybacks every year since 2011. This has reduced its share count by about 60%.

DDS Stock Buyback (Annual) Chart

Dillard's Share Repurchases (Annual), data by YCharts.

To the extent that Dillard's can keep its pre-tax earnings stable, aggressive share buyback activity can drive strong EPS growth. However, the company is barely holding pre-tax earnings flat right now, despite buoyant consumer spending. This doesn't bode well for the next downturn.

Indeed, Dillard's pre-tax margin was just 3.4% last year, down from 7.7% in fiscal 2014. In other words, the company doesn't have much room for error anymore. A relatively small margin decline could rapidly erode Dillard's profitability to zero (or worse). Thus, Macy's looks like a better option for investors looking to bet on a department store recovery.