Last week, a pair of Wall Street analysts cautioned investors to steer clear of Macy's (M -2.68%) stock, warning that poor weather may have undermined its first-quarter sales, causing an early end to Macy's earnings recovery.

All that agita was for nothing. On Wednesday morning, Macy's reported stellar results for the first quarter of fiscal 2018. While it did benefit from relatively easy comparisons and a shift in the timing of a major promotional event, Macy's also exceeded its plans by a wide margin. This gave management the confidence to raise its full-year guidance.

The recovery continues

Macy's revenue rose 3.6% year over year last quarter, reaching $5.54 billion -- far ahead of the average analyst estimate of $5.39 billion. Comp sales (including licensed departments) surged 4.2%, driven in part by the timing of Macy's annual Friends and Family sale. Excluding that shift, comp sales would have increased by approximately 1.7% last quarter. Importantly, sales to international tourists rose by nearly 10%, following years of declines.

The exterior of the Macy's flagship store in Manhattan

International tourists' spending at Macy's finally bounced back last quarter. Image source: Macy's.

This strong sales growth drove a big improvement in profitability, highlighting the operating leverage inherent in the department store business. (High operating leverage means that a small change in sales can drive a disproportionately large increase in earnings.) Excluding special items, operating profit reached $257 million, up 17% year over year.

The reduced corporate tax rate generated additional savings. As a result, adjusted earnings per share nearly doubled to $0.48 from $0.26 in the first quarter of 2017 (adjusted for new accounting rules governing revenue recognition).

Turning to the drivers of Macy's earnings growth, gross margin increased to 39% from 38.3% a year earlier, primarily due to better inventory management. Meanwhile, the company did a nice job of holding operating expenses in check. Selling, general, and administrative costs rose just 1.3% in Q1.

In fact, Macy's margin improvement and EPS growth would have been even higher but for some big real estate gains recorded in the first quarter of 2017. Real estate gains fell to $24 million last quarter from $68 million a year earlier. Excluding these gains in both years, adjusted operating profit surged 54% year over year.

The exterior of the Macy's San Francisco flagship store

Macy's real estate gains moderated last quarter. Image source: Macy's.

The comparisons were easy -- but this was still better than expected

Aside from the timing of the Friends and Family sale, Macy's also benefited last quarter from easy year-over-year comparisons. Macy's posted dreadful results in the first quarter of fiscal 2017. Sales plunged 7.5% on a 4.6% comp sales decline, while adjusted EPS plummeted 40% to $0.24 (under the old accounting rules) from $0.40 in the first quarter of fiscal 2016.

Given how bad Q1 2017 was, it wasn't that hard for Macy's to improve its performance last quarter. That said, Macy's did have to overcome unfavorable weather, as much of the country experienced unusually bad weather during March and April.

Furthermore, Macy's management stated that sales came in ahead of plan in each week of the quarter. Consumers are feeling good about the economy and the company's sales growth initiatives are starting to kick in earlier than expected. As a result, Macy's raised its full-year comp sales guidance by 1 percentage point and its EPS guidance range by $0.20. It now expects 1% to 2% comp sales growth and adjusted EPS of $3.75 to $3.95.

There's still more upside

Macy's shares jumped as much as 11% on Wednesday in response to the company's sales and earnings beat. Yet that still left the stock trading for less than nine times the midpoint of Macy's EPS guidance. This indicates that investors are skeptical that the company can sustain its recent momentum.

However, Macy's has plenty of room to continue improving its earnings. Its promising Macy's Backstage outlet concept, which has been lifting sales by 7% in test stores, is in the early stages of a broader rollout that will triple the number of locations by year-end, with the potential for further growth in 2019. Additionally, Macy's revamped loyalty program is just starting to gain steam. The company is also testing other growth strategies in 50 stores this year, which will provide insights that can be rolled out across the company in 2019.

Lastly, Macy's continues to own a valuable real estate portfolio, which it is gradually finding ways to monetize. It hasn't even begun to tap into the value of its greatest asset: the Macy's Herald Square flagship store in Manhattan.

All of these factors indicate that Macy's should be able to maintain and even grow its EPS over the next few years, despite the headwinds faced by department stores. That's why I'm holding onto my Macy's stock with the expectation of further gains.