An unsteady economy hasn’t shaken retail investors’ optimism about the stock market.