It turns out that President Donald Trump may not be bad for the stock market after all.
Asian stock markets stumbled shortly after Trump overtook Hillary Clinton in the presidential vote count early Wednesday. From there, Wall Street appeared set for a slump of its own, only it never materialized.
Global financial markets soon steadied as Trump delivered an acceptance speech pledging to unify a deeply divided nation.
And despite wavering in the first hour of trading, U.S. stocks rallied the rest of the day, lifting the Dow Jones industrial average within 50 points of a record high close.
"He took on a remarkably conciliatory posture," said Eric Wiegand, senior portfolio manager at the Private Client Reserve at U.S. Bank. "That went a long way to demonstrating, perhaps for the first time or very few times, his presidential disposition, and gave a greater sense of calm. That's what had an early reprieve in the markets."
The Dow ultimately climbed 256.95 points, or 1.4 percent, to 18,589.69. The average was briefly up 317 points.
The Standard & Poor's 500 index gained 23.70 points, or 1.1 percent, to 2,163.26 The Nasdaq composite index rose 57.58 points, or 1.1 percent, to 5,251.07.
Wall Street had largely seen Clinton as more likely to maintain the status quo, while viewing Trump's polices as less clear. Investor anxiety ratcheted up in recent weeks as the race tightened, leading to a nine-day slump for the market that ended Monday. By Election Day, the market had mostly bounced back and priced in a Clinton win.
On Wednesday, faced with a president-elect Trump, traders piled into health care and financial stocks — sectors seen as likely to struggle under a Clinton administration. They also sold off safe-haven stocks like utilities and consumer-focused companies.
Financial companies led the gainers, surging 4.1 percent. Banks and other financial stocks tend to benefit from higher interest rates and less government regulation, two things investors anticipate could happen during a Trump presidency.
Health care companies climbed 3.4 percent. The sector has taken a beating this year, reflecting in part fears that a Clinton presidency would lead to curbs on drug pricing increases that could hurt drugmakers and biotechnology companies.
Prison stocks also jumped sharply Wednesday. Shares in two of the largest private prisons companies, Corrections Corporation of America and GEO Group Inc., rose 34 percent jump and 18 percent.
President-elect Donald J. Trump has called for increased deportation of undocumented immigrants. Implementing that plan would heighten prison demand by ICE (Immigration and Customs Enforcement), analysts said, NBC News reported.
Utilities were down the most, sliding 3.7 percent, followed by consumer-focused stocks, down 1.3 percent.
Billionaire investor Carl Icahn was among those who seized on Trump's win to play the market. The billionaire told Bloomberg that he put about $1 billion "to work" on stocks early Wednesday.
Investors hope Trump plans for infrastructure spending, tax cuts and lighter regulation will benefit the economy. They expect those spending plans will call for issuing more debt.
A sell-off in bonds sent prices tumbling, driving the yield on the 10-year Treasury note up to 2.08 percent from 1.86 percent late Tuesday. That's the highest the rate has been since January. That yield is a benchmark used to set interest rates on many kinds of loans including home mortgages.
Traders are selling bonds to hedge against the possibility that interest rates, which have been ultra-low for years, could rise steadily again under a Trump administration, said Tom di Galoma, managing director of trading at Seaport Global Securities.
"People are starting to believe that Donald Trump is good for the economy, which makes him not so good for the bond market," di Galoma said. "You've also had the stock market come back overnight. People are starting to realize that a Trump presidency is not the end of the world."
Among individual companies that made big moves, health care companies like hospital chains and some insurers that gained business from the Affordable Care Act's coverage expansion took heavy losses. Meanwhile, shares jumped for drugmakers and pharmacy benefits managers that likely will face less regulatory scrutiny over price increases from a Trump administration.
HCA, the nation's largest hospital chain, fell 10.8 percent, while Viagra maker Pfizer climbed 7.1 percent. The biggest pharmacy benefits manager, Express Scripts Holding Co., rose 7.1 percent.
Traders also bid up shares in defense contractors, anticipating the companies will thrive under a Trump presidency. Northrop Grumman climbed 5.4 percent, while Lockheed Martin rose 6 percent. Raytheon added 7.5 percent.
Firearm sales typically surge when a presidential candidate who favors an expansion of gun-control laws is elected. That's not the case with Trump, however. That gave investors a reason to sell shares in firearm makers. Smith & Wesson slid 15.2 percent, while Sturm, Ruger & Co., fell 14.4 percent.
Markets in Europe posted solid gains.
Germany's DAX rose 1.6 percent, while France's CAC-40 gained 1.5 percent. The FTSE 100 index of leading British shares was 1 percent higher.
The Mexican peso fell sharply, declining 8 percent against the dollar as the prospect that Trump would repeal favorable trade policies with Mexico. The U.S. currency rose sharply to 19.87 Mexican pesos from 18.42 pesos.
U.S. crude oil prices closed higher after being down earlier in the day.
In metals trading, the price of gold slid $1 to $1,273.50 an ounce, while silver added 2 cents to $18.38 an ounce. Copper added 8 cents to $2.46 a pound.
Trump doesn't formally take the reins of power until January but he will begin the transition to his presidency almost immediately. In the coming weeks, investors will be looking to see if he further tempers some of the rhetoric that polarized American opinion and often spooked investors in financial markets.
Another point of interest will center on the U.S.'s trade relations with China and its impact across Asia. Trump's victory has raised concerns that the U.S. and China might embark on a trade war of sorts and that protectionism around the world will grow.
Those concerns weighed heavily on Asian stocks. Japan's Nikkei 225 index closed 5.4 percent lower, recouping some losses. Hong Kong's Hang Seng closed 2.2 percent lower.
Benchmark U.S. crude rose 29 cents to close at $45.27 a barrel in New York. Brent crude, used to price international oils, gained 32 cents to close at $46.36 a barrel in London.
Other energy futures were also mixed. Wholesale gasoline fell a penny to $1.36 a gallon. Heating oil held steady at $1.44 a gallon. Natural gas rose 6 cents, or 2.2 percent, to $2.69 per 1,000 cubic feet.