The history of years with gains of this magnitude at this juncture in the year with solid Q3 and September upside performance for the most part have been followed by more bullish market behavior and a continuation of the rally. But as you can see in the table of S&P 500 Performance Following Big Q3 Year-to-Date Gains the bulk of any damage occurred in October.
Of the top 30 S&P 500 9-month gains since 1930 all 30 years ended higher with average gains of 25.9%. Q4s were up 24, down 6, average gain 4.6%. Octobers were up 15, down 15 with an average gain of 0.01%. Of the most recent 12 occurrences October is down 7, up 5 with an average loss of -1.1%, which includes the Crash of 1987 and a -21.8% loss for October 1987.
Quoted from: