U.S. stocks rallied Wednesday, with the Dow industrials jumping 257 points, led by a surge in financial, health-care and industrial stocks, as investors bet on the infrastructure spending policy promised by President-elect Donald Trump.

Trump’s acceptance speech early Wednesday mentioning Keynesian-style spending and sounding a touch more conciliatory than had been the case during his campaign appeared to reset investors’ expectations.

The 70-year-old real-estate developer pledged to supporters gathered in New York City that he will “be president for all Americans.”

The Dow Jones Industrial Average DJIA, -1.57% gained as much as 316 points, briefly surpassing the all-time closing high set in August. The index closed 256.95 points, or 1.4%, higher at 18,589.69, its highest level since Aug. 18. Pfizer Inc. PFE, -0.05% and Caterpillar Inc CAT, -1.75% led the gains, rallying more than 7%.

The S&P 500 index SPX, -1.86% ended up 23.70 points, or 1.1%, at 2,163.26, as big gains in health care, financials and industrials more than offset sharp losses in defensive sectors such as utilities and consumer staples. The iShares Nasdaq Biotechnology ETF IBB, -0.79% was one of the clearest winners, surging 13%.

Meanwhile, the Nasdaq Composite COMP, -2.50% advanced 57.58 points, or 1.1%, to 5,251.07. Technology stocks in general were weaker, with uncertainty of trade policies hanging over global giants like Apple Inc. AAPL, -3.69% .

See:Trump trade policies could cost millions of U.S. jobs and hurt companies like UPS

The Russell 2000 index US:RUT outperformed the large-cap index, soaring 3.1% to 1,231.20 on Wednesday, to stretch the small-cap-stocks tracker’s win streak to four sessions.

Read:Trump victory divides stock market into winners and losers

Some analysts said the positive reaction in markets reflects the notion that the election results haven't changed the fundamentals of the economy.

“Not much changes short-term except emotions and rhetoric. So dips are opportunities because fundamentals are positive and if Trump plans to spend more, the economy and stocks will move higher next year too. Stocks are very resilient,” said Kate Warne, investment strategist at Edward Jones.

Read: Trump says he will honor ‘forgotten men and women’ as president

The rally on Wall Street was in contrast to sharp losses seen in the futures market before the market opened, as it became apparent that the Republican contender was close to pulling off a major upset in the U.S. presidential contest.

Dow futures plunged as much as 800 points late Tuesday and early Wednesday as Trump claimed victories in several key battleground states, while S&P 500 futures hit a trading limit, down 5%, the biggest futures decline allowed under CME Group rules.

Read: Trump victory a second wake-up call for complacent investors

As calm returned to Wall Street, implied volatility on the S&P 500, as measured by CBOE Volatility Index, VIX, +6.10% fell 20% to 15.02, after spiking well above 20 premarket.

The ICE U.S. Dollar index DXY, +0.32% , a measure of the dollar’s performance against a basket of six rivals, rose 0.7% to 98.545.

Marco Rubio is re-elected to Senate in Florida

Individual stocks: Financials surged thanks to a jump in interest rates to their highest levels since January. Shares of Bank of America Corp BAC, -1.60% surged 5.7%, Wells Fargo & Co. WFC, -2.32% gained 5.4% while J.P. Morgan Chase JPM, -1.11% rallied 4.5%. Navient Corp NAVI, -2.54% shot up 17% and was the top gainer on the S&P 500.

Biotechnology and pharmaceutical stocks also benefited. Pfizer Inc. PFE, -0.05% jumped 7.1%, while Celgene Corp US:CELG surged 11%.

Solar stocks sold off as investors contemplated how a Trump presidency would impact the renewable energy sector. The Guggenheim Solar ETF TAN, +1.93% tumbled 5.6%. First Solar, Inc. FSLR, +1.34% was down 4.2%.

Freeport-McMoRan, Inc. FCX, -5.58% was up 8.1% as prices of copper hit 52-week highs.

Other markets:Asian stocks fell sharply, with Japan’s Nikkei 225 NIK, -0.05% registering a 5.4% drop and Hong Kong’s Hang Seng Index HSI, +0.10% sliding 2.4%.

In Europe, the U.K.’s FTSE 100 UKX, +1.19% finished 1% higher, while the Stoxx Europe 600 index SXXP, +0.55% gained 1.5%.

Gold futures US:GCZ6 gave back most of their early gains to trade 0.1% higher at $1,276.3 an ounce. Treasury yields TMUBMUSD10Y, 0.680% rose 20 basis points to 10-month highs above 2%.