Last week, the S&P 500 closed higher for the eighth week in a row. That seems like an unusually long winning streak, and a quick look at history tells us that is unusual. But the more important question is whether two straight months of gains is a sign of exhaustion or strength.

Fortunately, there’s good news here. History says to expect more gains after a possible pullback this week.

This is the S&P 500’s 18th winning streak of at least eight weeks since 1950. The average performance after previous streaks is shown in the chart below. The gains in a typical week are also shown for comparison.

Stocks move higher most of the time. In an average week, the S&P 500 moves higher 56.6% of the time, delivering a 0.2% gain.

After an extended winning streak, the odds of a pullback increase. We see this in the fact that stocks moved higher just 52.9% of the time after previous streaks that lasted at least eight weeks. That means there is a slightly higher than average probability of a loss this week.

After the end of the streak, we usually see more gains.

One month, two months and three months later, the probability of a gain is higher than average.

The same pattern holds for the size of gains. One month, two months and three months later, we usually see higher than average gains in the S&P 500.

This all means we should expect better than average returns for the next three months.

The longest winning streak on record lasted 13 weeks. That occurred in 1957. It’s interesting that streak came as the Soviet Union was busy testing its first international ballistic missile.

This time, the S&P 500 powered higher as concerns about North Korea’s missile capabilities dominate headlines. History tells us the stock market can ignore news like this and move higher.

Combined with seasonality, this burst of momentum tells us we should stay invested in stocks for now.