After enduring the fourth-worst year in its history, the Nasdaq 100 (NASDAQ: NDAQ) index is roaring back to life. Cooling inflation has generated optimism that the Fed will slow down or pause interest rate hikes. But if your retirement date is approaching, choosing a more diversified investment, like an S&P 500 fund, is typically a safer bet.