When the stock market sells off, it can sometimes pay to rotate into defensive names. These are companies that are less sensitive to the overall economy, either due to their competitive position or their business model. Defensive stocks are often good places to seek shelter in a sell-off, and often outperform if the economy heads into a recession.

Just to be clear, defensive stocks won't be good candidates for outsized stock price performance. They are more about capital preservation and income. They also make for good stocks to help diversify a portfolio, which is also an important part of any investment plan.

Let's take a closer look at three top defensive stocks and discuss reasons why they can be a safe harbor when the broader market seas get rough.

A person in a suit looks at several computer monitors showing stock charts.

Image source: Getty Images.

1. CME Group has a competitive moat

CME Group (CME 1.90%) is the parent company of the Chicago Mercantile Exchange, the Chicago Board of Trade, the New York Mercantile Exchange, and a few other exchanges. The company is the biggest derivatives trading platform in the United States. 

CME Group dominates the interest rate derivatives space. These products let companies manage their interest rate risk by locking borrowing rates or hedging foreign exchange risk. Investors who utilize equity index futures (like S&P 500 futures) will also trade these products on CME Exchanges. 

CME has a competitive moat because investors will prefer to trade on exchanges where the liquidity is best. This means it is hard for a competing exchange to develop. CME only starts to be adversely affected if the economy enters a severe recession and the Federal Reserve is forced to cut the federal funds rate to 0%. At that 0% rate, the CME will see average daily volumes deteriorate as investors no longer need to hedge against falling interest rates. If the economy enters a garden-variety recession where rates remain above 0%, CME operations just keep generating revenue. 

2. Realty Income is a classic defensive stock

Realty Income (O 0.42%) is a real estate investment trust (REIT) that focuses on single-tenant properties under a triple-net lease agreement. Under these arrangements, the tenant signs up for a long-term lease (usually over 10 years) and is responsible for paying maintenance, insurance, and taxes on the property. It gives the tenant almost the same cash flows as buying and financing the property themselves, but leasing tends to give the tenant more flexibility with respect to how it manages its balance sheet. 

Realty Income is one of the more defensive REITs out there. This is because the company's tenants tend to be in businesses that are less sensitive to changes in the economy than other businesses. The typical Realty Income tenant is a drug store, convenience store, or dollar store. For instance, during the COVID-19 pandemic, most of the company's tenants were considered essential businesses and permitted to stay open.

Realty Income is a Dividend Aristocrat that pays out a solid dividend on a monthly basis and raises its dividend rate consistently, year after year. At current levels, it has a dividend yield of 4.4%, making this a great core holding of an income investor's portfolio.  

3. Alexandria Real Estate Equities is the leader in life sciences spaces

Alexandria Real Estate Equities (ARE 2.18%) is an office REIT that focuses on tech and life sciences companies. Office REITs have been under a cloud since the pandemic began as the work-from-home model has proven to be popular, which has caused investors to question the value of office space.

Alexandria focuses on life sciences spaces, which are highly specialized areas. These companies require laboratory spaces that meet all sorts of regulatory requirements, along with the specific needs of the client. They also tend to make poor work-from-home candidates, which ensures workers will be using the space.

Alexandria has extensive experience in developing and managing these very demanding types of office spaces and new entrants will find it hard to compete. Alexandria's major tech tenants also tend to be in growth mode, which bodes well for them finishing out their leases and for them expanding operations into additional specialized locations.

Those buying into Alexandria stock right now will get access to a dividend yielding 3.1%.