Why 2022 was a stock market year of extremes