"Overnight was all about uncertainty. Today we know" the result, said JJ Kinahan, chief strategist at TD Ameritrade. He said part of the day's rally was fueled by short covering, and that volatility will likely continue as traders eye Trump's potential Cabinet picks.

The day's rally took the major averages within 2 percent of their all-time intraday highs, and marked a stunning recovery from a sharp plunge in stock index futures overnight. Trade volume Wednesday was roughly 12 billion shares, the highest since the surprise U.K. vote to leave the European Union in June.

U.S. stocks surged more than 1 percent Wednesday with financials and health care leading after Republican Donald Trump won the presidential election, defying market expectations for a Hillary Clinton win.

The Dow Jones industrial average closed up more than 250 points at 18,589, with Goldman Sachs and Caterpillar contributing the most to gains.

With about half an hour to the close, the Dow briefly added more than 300 points and was tracking to close at a record high. The index came within about 25 points of its all-time intraday high of 18,668.44 touched in August and closed within half a percent of that level.

Financials leaped 4 percent in their best day since 2011 to lead S&P 500 advancers, followed by health care. Banks and diversified financials such as Morgan Stanley led financial sector gains, while biotech stocks led health care gains.

"Within financial services, there is a guarded view that there may be less regulation [under Trump] than under a Clinton presidency," said John Stadtler, head of U.S. financial services at PwC.



The Nasdaq composite closed 1.1 percent higher, as gains in biotech stocks more than offset declines in major tech names such as Amazon.com, Facebook, Microsoft, Alphabet and Apple.

"Part of what we'ere seeing today … might be inklings of a rotation out of secular growth stocks into cyclical growth stocks," Savita Subramanian, head of U.S. Equity and Quantitative Strategy at Bank of America Merrill Lynch said in response to a CNBC question on a media call Wednesday afternoon. She also said expectations for a strong dollar would likely also weigh on the tech stocks.

The U.S. dollar index traded more than two-thirds of a percent higher, with the euro near $1.092. The dollar was stronger against the , hitting a more than three-month high of 105.87, after earlier touching its weakest in over a month as investors piled into the safe-haven trade.

The Mexican peso plunged more than 12 percent to hit record lows against the dollar overnight, before easing to trade about 8 percent weaker versus the greenback.

Treasury yields leaped on expectations of a rise in inflation and growth. The 10-year yield climbed above 2 percent to hit its highest since Jan. 15.

Brent Schutte, chief investment strategist for Northwestern Mutual Wealth Management, said the rise in long-dated U.S. yields gave bank stocks a boost. The SPDR S&P Bank ETF (KBE) and the Regional Bank ETF (KRE) rose 5.2 percent and 5.6 percent, respectively.



Investors began adding exposure to health care and defense stocks, both of which saw significant pressure heading into the election, since Clinton was the favorite to win.



"We had a trial run in June with the Brexit vote," said Scott Clemons, chief investment strategist at Brown Brothers Harriman. "Like with Brexit, investors and traders are realizing that this is a process, not an event." "What you're seeing right now is a pretty predicable repositioning of portfolios."



On Wednesday, stocks posted a much better post-election day than in 2012, when the Dow and S&P both dropped 2.4 percent, while the Nasdaq slipped 1.4 percent.



Trump shocked the world by beating Clinton in the race for the White House. Trump's success was only part of a larger, crushing victory for the Republican Party, which retained the House and appeared poised to maintain Senate control.

Financial markets had originally priced in a victory for the former Secretary of State, along with the GOP retaining control of the House while Democrats obtained a slight majority in the Senate.

The U.S. electoral outcome led traders and money managers to initially take a more risk-averse approach, sending traditional safe-havens like gold through the roof. Gold futures for December delivery traded as high as $1,338.30 per ounce, before erasing gains to settle at $1,273.50.

Quincy Krosby, market strategist at Prudential Financial, said traders and money managers approached the election factoring in a possible upset by Trump. "It was in everyone's mind that there could've been an upset," she said. "What I'd like to see is gold losing some of the gains along with the 10-year [note]. It's very important to see confirmation in other parts of the market."



Trump's victory may have wide implications on multiple fronts, including trade, taxes and foreign policy, among others. His win also puts into question the likelihood of a Federal Reserve rate hike. Market expectations for a rate hike in December briefly fell to around 50 percent, before holding around 76 percent, according to the CME Group's FedWatch tool.

Overseas, European markets erased losses by late-morning ET, with the Stoxx 600 index 1.46 percent higher. In Asia, the Nikkei 225 shed more than 5 percent, however.

