By the Numbers

S&P on pace for best year since 1998. What's next?

Getty Images

If history is an indication, the stock market could extend its rally into December.

U.S. stocks finished the shortened-holiday week with another gain, up for eight consecutive weeks. The set its longest winning streak in nearly 10 years, while it was the Dow's longest consecutive weekly increase in three years. Both indexes are up 6.8 percent and 6.7 percent, respectively, in that period.

During Friday's trading session, the S&P 500, Dow industrials, Dow transports and Russell 2000 set new all-time intraday highs, while the Nasdaq hit a fresh 13-year intraday high.

Since the 1900s, December is the best month for the Dow, and second-best month for the S&P 500 and Nasdaq. Historically, all three indexes have gained on average between 1 and 2 percent, respectively.

The trend holds in recent times as well. In the past 20 years, the S&P finished positive in December 80 percent of the time, while the Dow industrials rose 75 percent of the time, and 55 percent for the Nasdaq. The real outlier, however, has been the Russell 2000 index, which posted a gain 85 percent of the time, up on average 3.36 percent.

Small-caps outperformed large caps by a large margin in 2013, rising 35 percent compared with an increase of 27 percent for the S&P. It's shaping out to be the best year for the Russell since 2003, and the best for the S&P since 1998.

(Read More: Here's how the market trades the week after Thanksgiving)

But the rally may not be over. Below is a look at how the market performed in December during the past 20 years.

December Seasonality
Year Dow S&P NAS Russell S&P Mid DJ Trans.
2012 0.6 0.71 0.31 3.34 2.03 3.67
2011 1.43 0.85 -0.58 0.47 -0.52 1.49
2010 5.19 6.53 6.19 7.79 6.41 5.17
2009 0.8 1.78 5.81 7.88 6.12 4.11
2008 -0.6 0.78 2.7 5.56 4.61 0.71
2007 -0.8 -0.86 -0.33 -0.23 -0.3 -1.95
2006 1.97 1.26 -0.68 0.2 -0.6 -3.54
2005 -0.82 -0.1 -1.23 -0.6 0.6 2
2004 3.4 3.25 3.75 2.81 4.09 3.81
2003 6.86 5.08 2.2 1.9 1.59 2.94
2002 -6.23 -6.03 -9.69 -5.73 -4.2 -2.15
2001 1.73 0.76 1.03 6.02 5.08 5.1
2000 3.58 0.41 -4.9 8.43 7.57 7.1
1999 5.69 5.78 21.98 11.16 5.85 2.32
1998 0.71 5.64 12.47 6.09 11.98 3.9
1997 1.09 1.57 -1.89 1.65 3.77 1.77
1996 -1.13 -2.15 -0.12 2.4 -0.01 -1.53
1995 0.84 1.74 -0.67 2.39 -0.39 -4.31
1994 2.55 1.23 0.22 2.5 0.75 0.81
1993 1.9 1.01 2.97 3.27 4.48 0.29
Average: 1.44 1.46 1.98 3.36 2.94 1.58
% Positive: 75% 80% 55% 85% 70% 75%


—BY CNBC's Giovanny Moreano. Follow him on Twitter: @giovannymoreano