14 stocks that hold up best at market highs

Daniel Acker | Bloomberg | Getty Images

Here we go again. Stocks are bumping up against all-time highs. Investors are enjoying the ride, but are understandably worried they'll be the ones to buy at the top.

Buying stocks at tops, of course, is a bad move since most stocks feel the pain. But if it's any comfort, there are 14 stocks in the Standard & Poor's 500, including ExxonMobil, Kellogg and lots of utilities like Wisconsin Energy and energy firms like Southwestern Energy, that have held up significantly better than the market during each and every one of the past three market peaks, according to a USA TODAY analysis of data from S&P Capital IQ.

To make the list, these stocks needed to outperform the S&P 500 by at least 15 percentage points during each of the past three market downturns between the bull top and the bear bottoms as defined by S&P Capital IQ strategy expert Sam Stovall.

Read More10 big tech stocks still 50% below 2000 levels

Look, no one wants to talk about market pullbacks when the market is ripping like it is now. Being conservative during bull markets can actually be costly if investors miss out on gains. But not being prepared for the inevitable pullback can be even more dangerous as investors see much of their bull market gains evaporate.

And that's why, when everyone else is partying, it's wise to at least know about stocks that have been almost Teflon-coated during downturns.

Read MoreMeet the most beaten-down large-cap stocks

Below are the 14 S&P 500 stocks that beat the S&P 500 by at least 15 percentage points in each of the past three downturns:

% ch. 7/16/1990-10/11/1990
% ch. 3/24/2000-10/9/2002
% ch. 10/9/2007-3/9/2009
Southwestern Energy SWN -3.70% 68.40% 26.50%
EOG Resources EOG 8.40% 80.70% -35.60%
Archer Dan. Midland ADM -2.80% 30% -23.00%
Wisconsin Energy WEC 0.40% 20.50% -21.00%
Southern SO 0.50% 23.50% -27.90%
Anadarko Petroleum APC 2.20% 29.50% -39.00%
Hess HES -0.80% 5.80% -18.30%
SCANA SCG -1.10% 10.70% -33.50%
AGL GAS -3.20% 17.80% -41%
Noble Energy NBL 1.50% 11.70% -41.10%
Amgen AMGN 2.60% -16.40% -18.90%
Dominion Resources D 0.60% -2.90% -38.40%
ExxonMobil XOM -1.30% -15.00% -30.30%
Duke Energy DUK 1.10% -33.80% -38.90%
S&P 500 ^SPX -19.90% -49.10% -56.80%
Source: S&P Capital IQ, USA TODAY, Sam Stovall

Take the example of Southwestern Energy, a natural gas and oil exploration company. The stock fell just 3.7% between the market's peak on July 16, 1990, and the ultimate bottom on Oct. 11, 1990. It's a loss, true. But it's much better than the 19.9% decline by the Standard & Poor's 500 during the same time. Southwestern held up even better — gaining 68.4% — between the market high of March 24, 2000, through the bottom on Oct. 9, 2002. During that time, the market fell a crushing 49.1%. And most recently, Southwestern rose 26.5% between the Oct. 9, 2007, peak and the March 9, 2009, low, beating the S&P 500, which fell 57%.

Chart source: MSN Money

Energy is clearly an area that has held up well during the past downturns. Six of the 14 stocks are from the energy sector, including EOG Resources and Anadarko Petroleum. But utilities are equally represented, as six of the 14 stocks are from that sector, including Wisconsin Energy and Southern Company.

Chart source: S&P Capital IQ, USA TODAY research via Microsoft Excel

Outside of the traditional defensive sectors, Archer Daniels Midland is a standout. The agriculture company posted an average 1.4% gain during past three bull-to-bear cycles. But Archer Daniels Midland is a good example of how during a vicious bear market, it's very difficult to hide all the time.

The stock only fell 2.8% in the 1990 decline and rose 30% in the 2000-2002 decline. But investors got nicked with a 23% hit in the 2007 to 2009 fall, albeit that's much better than the overall market's 56.8% fall during that time.

There's a huge caution. While these stocks have held up significantly better than the market, not one gained in each and every peak-to-trough period. And just three of the 14 stocks posted an average gain during the past three downturns.

And there's no guarantee these stocks will hold up again if the market is about to fall. Bear markets usually have their own points of pain, and these companies may not be as insulated next time. But there will be a next time, and these stocks do have a good track record.

Read MoreInvestorstoo complacent on rates: Fed's George

Below are the 14 S&P 500 stocks that topped the market by 15 percentage points or more during each of the market's peaks that turned into bear markets (displaying average change over past three bear markets):

Average % Ch. during past three bears
Southwestern Energy SWN 30.40% Energy
EOG Resources EOG 17.80% Energy
Archer Daniels Midland ADM 1.40% Consumer staples
Wisconsin Energy WEC 0.00% Utilities
Southern SO -1.30% Utilities
Anadarko Petroleum APC -2.40% Energy
Hess HES -4.40% Energy
SCANA SCG -8.00% Utilities
AGL GAS -8.80% Utilities
Noble Energy NBL -9.30% Energy
Amgen AMGN -10.90% Healthcare
Dominion Resources D -13.60% Utilities
ExxonMobil XOM -15.50% Energy
Duke Energy DUK -23.80% Utilities
(Source: S&P Capital IQ, USA TODAY, Sam Stovall)

—By Matt Krantz, USA Today

Contact Stocks


    Get the best of CNBC in your inbox

    › Learn More