Investors are looking on the bright side of life.
U.S.-stock mutual funds and exchange-traded funds in October logged their best monthly percentage gains of the year as a variety of worries—from inflation to the virus—failed to keep the market from hitting more records.