History: Apple earnings are a slam dunk. Buy it.

A customer poses with an iPhone 6 Plus and an iPhone 6 at the Fifth Avenue store in New York.
Adrees Latif | Reuters

If history is any guide, then Apple's quarterly earnings should soar through Wall Street estimates and the stock should rise to a record.

With the help of our partners at Kensho, a quantitative tool used by hedge funds to make winning trades, CNBC Pro looked at more than 10 years of data to get the definitive Apple earnings trade.

The bottom line is ...

... Apple is one of the best companies at the unspoken Wall Street game of "sandbagging" estimates. Under promise and over deliver is the game and the tech giant does it well.

(Management has denied this vehemently in the past and changed how they issue guidance to thwart this accusation.)

History shows the company topped earnings estimates 87 percent of the time, according to Bespoke Investment Group.

Since 2002, when Apple exceeds estimates the stock responds with an average return of 1.8 percent the day after the release, according to Kensho. Out of the 46 occasions analyzed, the shares traded positively 65 percent of the time the day after.

If history repeats itself Tuesday after the company reports results after the bell Monday, then Apple shares will touch a record price, a milestone they are less than 1 percent from as of morning trading Monday.

The company's post-earnings track record gets even better if you look at the era of the iPhone, its blockbuster product launched in 2007.

Read More Top tech investor: Buy Apple before earnings

Looking at those last eight years, Apple's shares traded higher the day after earnings 70 percent of the time.

One figure from Bespoke may also prove why the company is so good at beating the Street. On just 28 percent of occasions did Apple raise its profit forecast after earnings results. So it generally gives little guidance, or plays down the current quarter, so it can blow through results when the report comes.

To be sure, if the company does have a rare earnings miss, the shares are not rewarded well. Since 2002, there have been six occasions when Apple missed Wall Street estimates, according to Kensho, and the shares responded with a negative average return of 2.6 percent.

Past results do not guarantee future performance, but history is on the side of the longs for this trade.

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