Market Insider

The hottest stocks of July

Despite a stock market full of fear about Greece, the Fed and the upcoming earnings season, July may provide a midsummer respite from the recent downside volatility.

It could shape up to be a positive month, if trends in the market over the last 10 years repeat themselves.

According to market data and analytics firm Kensho, during that time span the month of July has averaged stock market gains across the major U.S. indexes.

Read MoreHere's where stocks are heading in the second half

Not only are there average gains for the S&P 500, Dow industrials and Nasdaq composite, all three post positive returns at least 60 percent of the time.

Trader on the floor of the New York Stock Exchange.
Getty Images

Leading the way is the Nasdaq composite, which averages a 2.1 percent gain for the month, and has posted a positive return in six of the last 10 years. The S&P 500 averaged a 1.6 percent rise and has also been positive in six of the last 10 years.

The crown for batting average, however, goes to the Dow Jones industrial average, which has posted a positive July return in seven of the last 10 years. The average gain during that time span was 1.9 percent.

Read MoreStocks in the first half offer a very mixed bag

The broader market strength also plays out in all 10 sectors of the S&P 500 index. During the last decade, the month of July has led to average gains across all of them. Some fare better than others.

Oil prices appear to have stabilized for the time being, and that may help energy stocks continue their bullish July trend. The sector has posted positive returns in eight of the last 10 years, and the average gain was 1.4 percent.

Technology, the largest sector of the S&P 500, posts a more impressive 2.4 percent average gain, but has been positive in seven of the last 10 years. Meanwhile utility stocks post the smallest average gain for July on average, at 0.5 percent, and have been positive in six of the last 10 years. Materials stocks have turned in a negative performance more often not over that time span.

NameAverage % Return# of Trades% of Trades Positive
S&P 500 Energy Sector1.40%1080%
S&P 500 Information Technology Sector2.40%1070%
S&P 500 Health Care Sector1.90%1070%
S&P 500 Consumer Staples Sector1.90%1070%
S&P 500 Financials Sector1.70%1070%
S&P 500 Industrials Sector1.40%1070%
S&P 500 Index1.60%1060%
S&P 500 Telecommunication Services Sector0.90%1060%
S&P 500 Utilities Sector0.50%1060%
S&P 500 Consumer Discretionary Sector1.50%1050%
S&P 500 Materials Sector1.80%1040%
Source: Kensho

As for individual stock standouts, there are a handful that have had a strong positive track record during that time. There are 457 members of the S&P 500 that have been around for at least the last 10 years, and among those, only 12 companies have posted positive returns in July in at least nine of that month's past trading periods.

Consumer electronics giant Apple makes the list, posting an average July return of 9 percent. Alexion Pharmaceuticals owns the biggest average July return, nearly 13 percent. However, only one stock in the entire S&P 500 has been positive every July for the past 10 years. That distinction belongs to Big Blue. IBM has not had a losing July in the last decade, and its average gain is nearly 6 percent.

Read MoreStocks at inflection point as second quarter ends

SymbolNameAverage Percent ReturnNumber of TradesPercent of Trades Positive
IBMInternational Business Machines Corp.5.70%10100%
ALXNAlexion Pharmaceuticals12.80%1090%
CELGCelgene Corp.9.90%1090%
AAPLApple Inc.9.00%1090%
SNASnap-On Inc.6.10%1090%
BXPBoston Properties4.60%1090%
AVBAvalonbay Communities4.50%1090%
ESSEssex Property Trust4.30%1090%
GSGoldman Sachs Group4.10%1090%
PSAPublic Storage3.70%1090%
SPGSimon Property Group3.60%1090%
ESRXExpress Scripts3.30%1090%
Source: Kensho

While there's no doubt there will be plenty of downside catalysts for the stock market to contend with, bulls may find a little more courage to stay invested during the month of July, if performance trends over the last 10 years continue this time around.

As many experts will point out, past performance does not necessarily predict future performance. With Greek headlines sure to dominate during the month of July, those trends may have a tough uphill climb in 2015.

—CNBC's Gina Francolla, Cara Caruso and Christopher Hayes contributed to this report.

Disclosure: NBCUniversal, parent of CNBC, is a minority investor in Kensho.