The U.S. stock market gained a record $1.2 trillion in capitalization in a single trading session — the rise came amid Trump's election failure.