×

Apple a good buy into year-end? Maybe not

With Apple shares up nearly 17 percent in the last month and trading at all-time highs, investors may be wondering whether the stock's momentum will continue into the end of the year.

During the last three months of the year, Apple has traded positively 80 percent of the time over the last 10 years while the S&P 500 has traded positively 70 percent of the time according to Kensho, a quantitative tool used to answer complex financial questions and find profitable trades. The median return on Apple shares over that same period is 14.88 percent and 6.58 percent for the S&P 500.

However, Kensho data also shows that most of Apple's gains in the last quarter happen in the first half. Over the last 10 years, Apple performed positively 70 percent of the time between Nov. 25 and Dec. 31. The S&P 500 performed positively 100 percent of the time. During this time period the median return on Apple was 2.8 percent while the median return for the S&P 500 was 2.2 percent.

"Fast Money" trader Steve Grasso says you need to consider other information when processing the data and making an investment decision noting this December could bring big iPhone sales. "Everyone has been waiting for this new iPhone, the iPhone 6, the iPhone 6 Plus. I think that's where you're gonna look back and say this is a buying opportunity and not a selling opportunity and not a time to say that you missed it."

Disclosure: NBC Universal is a minority investor in Kensho

By CNBC's Lisa Villalobos