Investing carries risk, and so does sitting on the sidelines: the S&P 500 is up 40% since ChatGPT was released in late 2022.