Interesting to note that if you'd bought and held the S&P500 index for the 20-year period of 1998 to 2018, you would have invested through the dotcom bubble and the great recession -- but still ended with an average real total return of 3.3% per year over that timeframe (adjusted for dividends and inflation)!
Edit: typo