The market just did something unconventional, and it could spell even bigger gains ahead

This market pattern suggests the rally is far from over

Historical trends appear to be playing a significant role in where the stock market is heading next, and that's good news for investors, says strategist Sam Stovall.

The chief investment strategist for CFRA, in a note this week, argues that the latest market patterns suggest this year's record-breaking rally is far from over.

"The market rose in price in August, September and October. And that's really only happened 12 times since World War II. But in 11 of those succeeding times, the market was higher in the rest of the year and was up an average of 3½ percent," Stovall said Tuesday on CNBC's "Futures Now. "

From April 30 through Oct. 27, Stovall wrote, the did something unconventional. It surged 8.3 percent versus the 1.4 percent historic average. That period, which includes the old "sell in May and go away" adage, is typically known as weak.

So does this mean the markets could flip and grow weaker in the next six months? Stovall says no, it's actually the opposite.

"Whenever we have been higher by 5 percent or more, and that's happened 26 times since World War II, we ended up with a strong end of year return. Plus, we ended up showing an even better return November through April in what I call the cyclical six months of the year," he added.

The frequency of an increase in price also went higher, according to Stovall.

Taking into account the historical trends, Stovall sees the potential for another 2 to 4 percent rise before January. That would take the index between 2,627 and 2,678, based on Tuesday's close.

That estimate is within his official 12-month rolling target of 2,640 on the S&P 500.

"We may be getting there a little bit early," Stovall said. "The real question is what happens? Do we hold those gains or do we digest the gains once we have made this move into the new year?"

The answer may come down to a viable Republican tax reform package, which is expected to be announced Thursday morning.