UPDATE: Charts in this story have been updated to reflect the day's trading.

There has been quite a bit of talk lately about the United States entering into another recession. It's easy to see why. The U.S. is expected to have $22.4 trillion in debt by the end of fiscal 2016. Additionally, the Federal Reserve is expected to slowly raise interest rates. And, the S&P 500 is trading for a price-to-earnings multiple of over 25 -- its historical average is around 15.

The average recession takes place a few years apart, yet the U.S. economy has not seen recession since 2008. With this in mind, it may be a useful exercise for investors to put focus on some of the companies that are best-equipped to come through recessions relatively unscathed.

Now is a good time to look for recessions-resistant stocks to add to your portfolio.

There is arguably no stock with a more recession-resistant business model than retail giant Walmart(WMT) - Get Report .

Image placeholder title

Walmart is a natural stock pick for investors looking to get more defensive, because Walmart is the largest discount retailer in the world.

When the economy enters recession, consumers tend to scale back their spending and trade down from higher-end retailers to discount retailers such as Walmart.

This is why Walmart sailed through the last U.S. recession. In 2008, the U.S. economy was brought to its knees, in a period dubbed the Great Recession. But Walmart performed surprisingly well in such a difficult macro-economic climate.

For example, from 2007-to-2009, a period which encompasses the worst recession since the Great Depression, Walmart managed to grow its earnings per share from $3.16 per share in 2007 to $3.66 per share in 2009, for a 16% earnings growth rate in two years.

This is extremely strong performance, considering earnings per share in the S&P 500 Index declined 25% in the same two-year period.

Another indication of Walmart's recession-resistant business model is that the company has raised its dividend for 43 years in a row, including a 2% increase in 2016. Walmart's long dividend history makes it one of just 50 Dividend Aristocrats -- stocks with 25-plus years of consecutive dividend increases.

Not surprisingly, Walmart stock was a huge out-performer because of its relative stability. In 2008, the S&P 500 lost 37% of its value, but Walmart stock gained 22%. In fact, Walmart was one of only two stocks in the Dow Jones Industrial Average to increase in value that year.

From this perspective, one could think that Walmart actually benefits from economic downturns.

Going forward, Walmart intends to strengthen its customer relationships even further by making significant investments in its employees and its stores. Last year, Walmart announced a commitment to spending $1.2 billion to raise employee wages, and another $1.1 billion to build its e-commerce and mobile businesses.

Walmart's e-commerce ambitions are right on the money, given the explosive growth of Internet based retail led by industry juggernaut Amazon(AMZN) - Get Report . Amazon's dominance in e-commerce is a significant threat to Walmart, but Walmart has seen great success in its own e-commerce platform.

Image placeholder title

In the first quarter of fiscal 2017, Walmart's e-commerce business grew sales by 7%. Its e-commerce growth actually accelerated in the second quarter, to 13%.

To be sure, Walmart's additional spending is likely to suppress its earnings this year. Based on management forecasts, earnings are expected to decline as much as 10% in fiscal 2017, reflecting the elevated level of investment. But improving both the condition of its stores, the expertise of its employees, and its image with the public, are all likely to pay off in the long term.

There is evidence that suggests the strategy is already working. Not only is Walmart's e-commerce business booming, but a separate part of its strategy-growth of small stores-is doing extremely well.

Through the Neighborhood Markets banner, Walmart has gained entry into large cities, which provides huge growth potential for the company because these areas were previously inaccessible. Urban areas cannot support the necessary square footage to build one of Walmart's Supercenters, but thanks to Neighborhood Markets, Walmart won't miss out on all those millions of potential customers.

Comparable sales, a hugely important figure for retailers that measures sales at stores open at least one year, rose 6.5% for Neighborhood Markets last quarter. This helped Walmart grow U.S. comparable sales by 1.6% last quarter, the eighth consecutive quarter of comparable sales growth in the U.S.

Last quarter, Walmart's traffic increased for the seventh consecutive quarter, another promising sign that its reputation with consumers is improving.

Walmart stock trades for a price-to-earnings ratio of 16, which is cheaper than the S&P 500 Index. And, Walmart offers a 2.7% dividend yield, which is above the average dividend yield in the S&P 500. Walmart's recession resistance, stability, above average dividend yield, and below average price-to-earnings ratio help to give it a Top 10 rank using The 8 Rules of Dividend Investing.

Its cheap valuation and above-average dividend yield can provide downside protection if another recession hits.

This article is commentary by an independent contributor. At the time of publication, the author was long WMT.