Wal-Mart’s stock has been battered this year, but there are two key factors working very well for the company.