Year-end rally hopes are starting to get dashed. What history tells us about what comes next