People run with Nunez del Cuvillo's fighting bulls during the eighth day of the San Fermin Running of the Bulls festival in Pamplona, Spain.

Stocks have risen for six months in a row, suggesting more gains could be on the way, if history is any indication.

The posted a six-month winning streak between April and September, strongly recovering from a correction seen in February and March and overcoming fears of a trade war. This marks only the sixth time since 1928 such a streak took place between April and September, according to Bespoke Investment Group.

These streaks have typically preceded strong returns for investors heading into year-end. Data compiled by Bespoke show the S&P 500 averages a fourth-quarter gain of 9.2 percent when it notches a six-month winning streak between April and September, above the 8.2 percent median gain.

The broad index's gains are also far stronger for October after such a winning streak, the data show. Gains in October average 2.4 percent when the S&P 500 is riding a six-month winning streak. By comparison, the S&P 500 has averaged a gain of 0.6 percent since 1928.

The S&P 500 came into Monday's session having risen about 11 percent over the past six months and 9.5 percent year to date. The index also hit an all-time high on Sept. 21.

Robust economic growth and strong corporate earnings have boosted the index in that time. They have also offset concerns of tighter U.S. monetary policy and fears of a global trade war.

This latest six-month winning streak is the 27th overall dating back to 1928. In the previous 26, the S&P 500 has averaged a gain of nearly 1 percent in the following month, according to Bespoke. The index also averages a rise of 3.9 percent in the subsequent three months following the streak, with positive returns 85 percent of the time.