Wal-Mart (WMT 1.02%) has treated investors to a disappointing year so far. The stock is down about 25% year to date, reaching levels not seen since 2012. The retailer has reported mostly weak earnings this year, and in August the company cut its forecast for full-year profit. Wal-Mart now expects its earnings to decline compared with last year.

Source: Wal-Mart.

A combination of stagnant revenue (a situation that is in part due to currency issues), rising labor costs, and increased investments in e-commerce is driving down Wal-Mart's profits. In the long- term, the company expects these initiatives to pay off, but at the moment, investors are none too thrilled with the retailer's performance. With Wal-Mart stock having lost 25% of its value so far this year, is it time to buy?

Sales aren't as bad as they seem
Wal-Mart's revenue barely grew during the second quarter, rising by just 0.1% year over year. But this number hides the details, which are far more important for investors to understand. The U.S. business went through a rough patch in early fiscal 2015, which ended in January, but the business has shown significant improvement over the past few quarters.

Period

U.S. Comparable-Store Sales Growth

Q1 2015

(0.08%)

Q2 2015

0%

Q3 2015

0.5%

Q4 2015

1.5%

Q1 2016

1.1%

Q2 2016

1.5%

Source: Wal-Mart quarterly reports.

The 1.5% comparable-store sales growth during the second quarter was driven almost exclusively by an increase is store traffic, which rose 1.3% year over year. The vast majority of retail sales in the U.S. still take place in bricks-and-mortar stores, with only about 7.2% taking place online, so the growth of e-commerce doesn't seem to be having much of an effect on Wal-Mart's stores.

In the International segment, revenue declined by 9.6% during the second quarter. However, currency exchange rates had a severe negative impact on Wal-Mart's results, and excluding these effects, International revenue grew by 2.8% year over year. Overall, $4.2 billion of sales were wiped out by a stronger U.S. dollar during the quarter.

Wal-Mart's total revenue grew by 3.6% year over year during the second quarter on a constant currency basis, a number that looks a lot better than 0.1%. E-commerce sales were also strong, growing by 16% year over year on a constant currency basis, but online sales are still only a small fraction of Wal-Mart's total sales. Wal-Mart's reported sales growth makes the situation look grim, but the company is doing far better than the headline number suggests.

Making necessary investments
Wal-Mart's operating profit declined by 10% during the second quarter, or 7.2% adjusting for currency, despite the company's revenue growth. Earlier this year, the company announced a variety of new initiatives for its employees, including fixed scheduling, new development programs, and an increase in the starting wage to $9 an hour. In February of next year, all current U.S. employees will make at least $10 an hour, with new hires starting at $9 and moving to $10 after completing a six-month training program.

These initiatives have resulted in higher labor costs for Wal-Mart, and the company expects its per-share profits to be reduced by $0.24 during fiscal 2016 as a result. In the long term, Wal-Mart's goal is to improve the customer experience in its stores, with the idea that better-paid employees with be more helpful and productive.

Higher wages may also help with Wal-Mart's ongoing problem with shrink, some of which can be attributed to theft by both customers and employees. Wal-Mart is testing bringing front-door greeters back in an effort to fight shrink, three years after moving them away from the front door to perform other tasks. While this effort will probably lead to higher labor costs, it could potentially increase profitability if shrink can be reduced.

Along with investing in its employees, Wal-Mart is making investments in its e-commerce business, which will reduce its earnings by between $0.06 and $0.09 per share in fiscal 2016. In the long run, Wal-Mart needs to be the lowest-cost retailer both in-store and online, and while the company is still far behind in e-commerce, it seems more serious about the effort than at any point in the past.

Is Wal-Mart a buy?
With Wal-Mart expecting EPS between $4.40 and $4.70 during fiscal 2016, a decrease compared with last year, investors would be paying 14 to15 times these expected earnings at the current stock price. Even after a 25% decline, then, the stock doesn't look all that inexpensive. But it's the long-term story that matters, and while Wal-Mart's earnings are currently in decline, it appears that the company is taking the necessary steps to improve profitability in the long run.

At the beginning of the year, when shares of Wal-Mart were trading near $90, the stock was fairly expensive at around 18 times earnings at the time. Investors are getting a far better deal today at around $65 per share, and a dividend yield of 3%, the highest in Wal-Mart's history, is icing on the cake. While Wal-Mart is far from a no-brainer value stock at this price, given the competitive advantages that Wal-Mart enjoys, buying shares of the company is unlikely to be a bad idea for a long-term investor.