With counting continuing in the battleground states, investors were abandoning cautious positioning that many took ahead of the election, driving all of Wall Street’s main indexes up by around 2 percent.