Some of the major averages reaching record highs has not boded so well for stocks in the past, according to S&P Capital IQ.