It's always useful to be invested in a few stocks that can perform well during all market conditions, because it helps provide balance to an investment portfolio. In this vein, O'Reilly Automatic, Inc. (NASDAQ:ORLY), Zoetis, Inc. (NYSE:ZTS), and the SPDR Gold Shares (NYSEMKT:GLD) ETF, as well as their respective sectors, have either already demonstrated an ability to grow revenue in a recession or possess qualities that can actually help them benefit from a recession.

Make money during any market conditions with recession-proof stocks. Image source: Getty Images.

Auto-Parts Retailers

There are two key trends that favor buying an auto-parts retailer like O'Reilly Automotive, Inc as a recession-proof stock:

  • If the economy pulls back, consumers tend to hold off purchasing new cars. Because old cars need more servicing, it's usually good news for auto-parts retailers.
  • Cars are becoming increasingly sophisticated, meaning "Do It For Me" (DIFM) is likely to grow faster than "Do It Yourself" (DIY) in future years. This is good for O'Reilly Automotive's dual-store (DIY and DIFM) model.

The first point -- that more older cars will be used -- suggests demand will hold up in a recession. As you can see below, all three of the leading players in the industry managed to grow revenue during the 2008-2009 recession.

ORLY Revenue (Quarterly YoY Growth) Chart

ORLY Revenue (Quarterly YoY Growth) data by YCharts.

In case you're wondering, the big revenue jumps for O'Reilly Automotive in 2009 and Advance Auto Parts in 2014 are the result of acquisitions. O'Reilly Automotive's acquisition of CSK Auto Corporation saw the company expand its dual-store strategy.

The results can be clearly seen in the relative improvement across a raft of metrics compared to AutoZone, primarily a DIY retailer. O'Reilly Automotive is well positioned for any market condition.

ORLY Operating Margin (TTM) Chart

ORLY Operating Margin (TTM) data by YCharts.

Indeed, all three stocks were in positive territory during the two-year period straddling the epicenter of the last recession. As you can see below, the S&P 500 declined 39% in the same period.

ORLY Chart

ORLY data by YCharts.

Animal health

The second sector to look at is animal health, and in particular, the companion animal market. Livestock can be cyclical -- after all, commodity prices fluctuate considerably -- but recessions don't usually stop people from caring about their pets. It's not a foolproof argument, as economic slowdowns tend to cause people to visit veterinary practices a bit less, but the evidence is that animal health does well enough in a recession.

For example, I've delved into Pfizer's annual reports, and here's how its animal-health sales fared between 2005 and 2012, after which Zoetis Inc. was spun off.

Data source: Company accounts. Chart by author.

To be fair, revenue did decline by 2% in 2009, but that was due to a 5% negative impact from foreign-exchange movements.

Moreover, Zoetis isn't just a stock with defensive properties. Management forecasts revenue growth of between 5.1% and 8.7% from this year to 2017, with adjusted diluted EPS forecast to improve by 16.3% to 24.6%. In addition, now that Zoetis is separate from Pfizer, investors have a chance to get direct exposure to animal health without the regulatory and pipeline uncertainty inherent in big pharma stocks.

Gold, always gold

Now, I know what you're thinking -- but bear with me. Gold, or in this case, the SPDR Gold Shares ETF, is always touted as an anti-recessionary investment, but its importance is likely to increase should the global economy fall into a recession in future years. The rationale here is that the global economy is in uncharted territory with regard to current debt levels and recessions.

The chart below shows debt-to-gross domestic product (GDP) for some major countries and the eurozone. In every case, the debt load is higher than it was entering the last recession, and there appears to be little political will to do much about it.

US Government Debt Chart

U.S. Government Debt data by YCharts.

Perhaps the next recession really will see gold massively outperform, as the doom and gloom merchants have long told us it will. In the event of a crisis of confidence over government bonds, gold would likely be a good investment.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.