The Business Cycle Dating Committee at the National Bureau of Economic Research hasn't made the official call on whether we're currently in a recession. Either way, high inflation and rising interest rates have left many investors worried that a recession is looming.

Recessionary periods are tough on everybody, but they can be especially brutal to economically vulnerable companies. Revenues can crumble in a recession, leaving companies that may be overleveraged unable to meet their debt obligations, or forced to cut their dividends. Knowing this, many investors are choosing to reevaluate their portfolios and move more of their assets into recession-resilient companies.

If you're worried about a recession, here are two stocks that can help get you through.

1. Public Storage

The number of Americans who rent storage units has increased by 5 percentage points from 2020 to a record 38% in 2021. More people are using them to help free up space in their homes. But challenging circumstances like divorce, relocation, death, or downsizing are also reasons people may turn to a storage facility.

This diverse customer base is what makes the self-storage industry so resilient during recessionary periods. There is demand for these spaces during good times and bad.

Public Storage (PSA 0.41%) is the largest self-storage operator in the world, with more than 2,800 facilities in its portfolio. The quality of the company's portfolio and its financial standing are unmatched by its competitors. Its debt-to-EBITDA (earnings before interest, taxes, amortization, and depreciation) ratio of roughly 3.7 is the lowest among the self-storage real estate investment trusts (REITs) and one of the lowest in the entire REIT industry.

It also had $883 million in cash on hand as of the end of the third quarter -- $796 million more than the No. 2 player in the segment, Extra Space Storage. And its operating margin is 80% -- the highest in the self-storage industry. 

In Q3, Public Storage's revenues rose 14% year over year, and its core funds from operations (a metric that REITs use instead of earnings, as it better reflects their operating performance) grew by 20% from the prior-year period. However, there are signs demand could be slowing. Occupancy levels have fallen over the past few quarters, and are now at 94.5%. This isn't hugely surprising given that demand for storage boomed after the onset of the coronavirus pandemic.

Even if occupancy falls further in light of a recession I don't think the company will see huge drops in its revenues. It has already acquired 57 new facilities this year, and it has more than enough cash to keep expanding. Right now, the stock trades at around 18 times its funds from operations, which is a fair valuation. Plus, at the current share price, its dividend yields nearly 3%.

2. Agree Realty

Agree Realty (ADC 0.60%) is also a REIT. But unlike Public Storage, it owns and leases retail properties -- more than 1,700 of them across 48 states. It may surprise you to see a company heavily invested in the retail sector described as being "recession resistant." After all, the retail industry is quite vulnerable to economic downturns. 

However, Agree Realty's business model makes it a safe play even in rocky economic times.

The company uses long-term triple net leases that can last anywhere from seven years to 10 or more. This creates a reliable income stream for the REIT while passing most responsibilities on to the tenant. Agree Realty's diverse tenant base means no more than 9.4% of its annualized base rents come from a single industry. Plus, its tenants are largely institutional-grade companies, and include some of the biggest names in home goods, bulk stores, fast food, quick service restaurants, grocery stores, and convenience stores.

Walmart is its largest tenant, providing roughly 7% of its annualized base rents. Giants like Walmart may not be immune to recessions, but often, they will have more liquidity to get through challenging times in better shape than their smaller peers. Agree Realty's occupancy was an impressive 99.7% as of Q3 2022, a testament to the stability of its net lease model. Its earnings from the period support that -- net income rose 11.1% and adjusted funds from operations climbed 7.8% from last year.

In addition to its net lease retail portfolio, the company also has a small but growing ground lease business, under which it leases the land below a retail property to institutional tenants. Its ground lease portfolio is 100% occupied and accounts for around 13% of the REIT's annualized base rents. The company is actively expanding that portfolio, and has purchased 303 properties so far this year. 

Although it expects to spend between $1.6 billion and $1.7 billion this year on acquisitions, Agree Realty still has a conservative balance sheet. Its debt-to-EBITDA ratio is just 4 and its dividend payout ratio is 75%. Plus, it has enough cash on hand to cover its debt maturities until 2028 and maintain its dividend payout streak.

Not only does Agree Realty offer an attractive yield of just over 4% at the current share price, it's also one of the few REITs to pay its dividends monthly. And it has raised its payouts 18 times in the last 10 years. The stock trades for around 17 times its adjusted funds from operations, making it attractively valued, especially considering the safety it offers investors.