The latest survey of economists by Bankrate puts the probability of a U.S. recession occurring in the next 12 months at 59%. That's why aside from yesterday, now is the next best time to prepare your investment portfolio for economic contraction.

In that spirit, here are two consumer-staple stocks to consider buying that could make your portfolio more resilient for the next recession. 

A businessperson works on a laptop.

Image source: Getty Images.

1. PepsiCo: Home-consumption channels are recession-resistant

PepsiCo (PEP -0.62%) is easily one of the best food and drink companies on the planet. It sells thousands of products in over 200 countries and territories throughout the world -- products which are enjoyed by more than one billion people daily.

As you'd expect for a company this size, PepsiCo's snack and beverage portfolio consists of numerous brands that generate at least $1 billion in annual sales. These include Lay's potato chips, Pepsi-Cola, Tostitos tortilla chips, and Gatorade sports drinks.

The tremendous depth of the company's brand portfolio isn't the only trait that makes the company practically recession immune. Unlike Coca-Cola, whose products are more often sold at away-from-home venues (i.e., restaurants and movie theaters), PepsiCo's products are targeted more toward home consumption. This makes PepsiCo more recession-proof than Coca-Cola because in more challenging times consumers tend to be less willing to spend and more likely to stay home.

Analysts think PepsiCo's earnings will grow at a respectable annual rate of 8.5% over the next five years. At the same time, the stock's 2.7% dividend yield is meaningfully higher than the S&P 500 index's 1.5% payout, which income investors are likely to find attractive. That is especially true given that the company's dividend-payout ratio stands at less than 65%, enabling more dividend growth ahead.

Further sweetening the pot to make the stock a buy, PepsiCo's forward price-to-earnings (P/E) ratio of 23 is reasonable compared to the non-alcoholic beverages industry-average forward P/E ratio of 22.1. 

2. Dollar General: A business model that can hold its own

As it's practically wired into the DNA of humanity, nearly anyone can probably appreciate a bargain. This explains how the dollar-store chain Dollar General (DG -0.41%) has achieved such immense success since its founding in 1955. The company has 19,000-plus stores in 47 U.S. states.

The retail chain's price points mostly attract lower-income consumers. But with inflation still above the Federal Reserve's target of 2% and recessionary concerns, more customers above the income brackets of its core customers are flocking to its stores.

As Dollar General stocks more expensive items like basic groceries and healthcare goods at higher prices, there's reason to believe it can drive sales growth from core customers and newer customers alike. That is why analysts are projecting that earnings will increase by 5.3% annually over the next five years. 

The company's 1.5% dividend yield probably flies under the radar of most income investors. But with the dividend-payout ratio poised to register at around 23% for the current fiscal year ending next February, the payout has plenty of flexibility to keep rising at a high-single-digit clip annually for the foreseeable future.

Just like its products, Dollar General's stock currently offers immense value. The shares are trading at a forward P/E ratio of 14.6, which is well below the discount stores industry-average forward P/E ratio of 23.1.