U.S. President-elect Donald Trump speaks at election night rally in Manhattan, New York Thomson Reuters Stocks rallied on Wednesday following a chaotic night in markets that ended with a surprise victory for Donald Trump in the US presidential election.

In the final hour of trading, the Dow Jones Industrial Average crossed its previous record high on a closing basis of 18,613.52.

"Clearly, the market and investors underestimated the prospect of a win by him," said Mark Heppenstall, the chief investment officer at Penn Mutual Asset Management, where he oversees $20 billion in assets.

"However, they've just as quickly come to realize that the implications for US financial assets aren't as dire as maybe some of the same folks that really didn't give him much of a chance are warning about after the election," he told Business Insider.

Here are some of the sectors that made notable moves:

Drug stocks are soaring. Democratic presidential candidate Hillary Clinton had outlined plans to curb drug price increases. The iShares Nasdaq Biotech Exchange Traded Fund, which tracks biotechnology stocks, jumped 7%. The finance sector also gained on the expectation of less regulation.

Private-prison stocks soared, and Corrections Corporation of America gained as much as 35%. President Barack Obama and the Department of Justice announced in August that the federal government would stop using private facilities.

Gun stocks plummeted, with Smith & Wesson down by as much as 16%. Trump's victory could fade some demand for stocks since there may be less panic about tougher gun laws.

Markets Insider

The Republican sweeps of the Senate and House of Representatives could make it easier to push pro-business initiatives like tax cuts. This prospect is adding to the huge sentiment boost Wednesday, even though many investors considered Trump the more unpredictable candidate.

"We think the main result of Donald Trump's election will be that Trump will be able to appoint regulators who are more industry-friendly than regulators appointed by President Obama," Brian Gardner of Keefe, Bruyette, and Woods wrote in a note.

On Tuesday, both Nasdaq and S&P 500 futures fell so hard that they triggered a limit-down — the maximum amount by which they're permitted to fall before trading restraints kick in.

A Clinton victory was considered more positive for financial markets, at least initially, given investors' familiarity with her political career and the sense of continuity she would have likely provided.