The S&P 500 and Nasdaq gained Thursday after the Federal Reserve's interest rate decision and as the stock market reacts to Donald Trump beating Kamala Harris to win the U.S. presidential election.