Wal-Mart (NYSE:WMT) stock had already been having a bad year before this week. However, its dour outlook for earnings over the next three years -- revealed at an analyst meeting on Wednesday -- compounded the damage.

By Thursday, shares of Wal-Mart had fallen below $60 for the first time since early 2012. The stock has now lost more than 30% of its value this year.

Wal-Mart Stock Performance, data by YCharts.

Wal-Mart has continually disappointed investors with the slow pace of its turnaround effort. The company's medium-term outlook confirms that the earnings picture will get worse before it gets better. Nevertheless, the stock may finally be cheap enough to be worth a look for patient investors -- especially income investors.

Investments depress profit
Back in August, Wal-Mart reduced its earnings guidance for the current 2016 fiscal year to a range of $4.40-$4.70, compared to an original forecast range of $4.70-$5.05. It attributed the cut to the strong dollar, economic weakness in many international markets, and a variety of issues in the U.S. -- including pharmacy margin pressure, increased "shrink" (lost or stolen merchandise), and strategic investments in higher staffing levels.

These headwinds came on top of Wal-Mart's investments in higher employee pay and better training. U.S. Walmart stores increased their starting wages to at least $9/hour in April, adding roughly $1 billion in costs this year alone.

Wal-Mart workers are getting another raise in February, after which all current employees will earn at least $10/hour. (New workers may still start at $9/hour.) Since these increases will hit at the beginning of the 2017 fiscal year, the incremental cost will be even higher next year, at $1.5 billion. The company's investments in e-commerce growth are also driving bigger losses for now.

Pay raises are one major factor depressing Wal-Mart's profitability.

As a result, Wal-Mart CFO Charles Holley estimated that earnings per share will decline by 6%-12% next year. Based on the midpoint of the company's FY 2016 earnings guidance, that would imply EPS of $4.00-$4.28 in FY 2017.

Given the clear headwinds posed by the strong dollar and wage increases, it should have been obvious that it would take a few years for Wal-Mart to return to sustainable earnings growth. Yet for some reason, analysts had been expecting fiscal 2017 EPS to rise to $4.75 prior to this week's meeting. With analysts having such unrealistic expectations coming in, the massive wave of selling after the guidance was announced wasn't very surprising.

The price is (almost) right
Despite Wal-Mart's downbeat earnings outlook -- earnings likely won't return to the level of FY 2013 until at least 2020 -- the stock is starting to look attractive due to its modest valuation.

Wal-Mart stock now trades for about 14 times the midpoint of the company's implied FY 2017 earnings guidance. Management expects Wal-Mart to return to modest EPS growth in FY 2018, with EPS growth accelerating thereafter as it leverages its recent investments.

Additionally, the company's dreadful stock performance has boosted Wal-Mart's dividend yield to a substantial 3.3%. Dividend increases could be slow for the next few years, but the payout ratio should remain below 50%, indicating that the dividend payout is sustainable and even has room for growth in the long run.

Wal-Mart also plans to buy back $20 billion of stock in the next two years. Based on the current stock price, that would allow it to reduce its share count by more than 10%. Wal-Mart can afford these generous shareholder returns -- even with profitability depressed in the short run, it expects to generate about $47 billion of free cash flow in the next three years.

Returning to earnings growth is key
Of course, Wal-Mart's reduced valuation won't make it a good investment if its profit continues to shrink indefinitely. Fortunately, its investments in raising employee pay, adding more department managers, and increasing staffing are already generating tangible results.

For example, customer satisfaction scores for its U.S. stores have already risen from 16% to 67% since the beginning of the year. The company's net promoter score is also rising. These improvements have contributed to a better sales trajectory. Last quarter, the Wal-Mart U.S. segment posted 1.5% comp sales growth.

Wal-Mart expects its top line to grow at a 3%-4% annual rate for the next few years. That would add $45 billion-$60 billion in annual sales over the next three years. Investments in improving customer service, opening smaller stores, and building out e-commerce capabilities should drive slow but steady sales growth thereafter.

It will take many years of 3%-4% sales growth to leverage the company's investments. However, in the long run, Wal-Mart should be able to offset most (if not all) of the margin contraction it is currently facing, driving solid earnings growth relative to its projected FY 2017 results.

If Wal-Mart can stay on this trajectory, its stock is likely to recover in the coming years. In the meantime, its 3.3% dividend yield offers investors good compensation for their patience.

Adam Levine-Weinberg has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.