If history is any indication, then the market may see substantial gains in the coming months.