Despite a late upturn, 2022 was not kind to investors