This year ended on a record-breaking note for the S&P 500 and the Dow.