US stocks have opened higher as investors cheered projections that Donald Trump had won the presidential election.