Dow, S&P gain in choppy trade, U.S. election in focus