Stocks surged Wednesday after President Trump addressed the nation about Iran attacking U.S. forces at two Iraqi bases.

Continue Reading Below

"The United States will immediately impose additional punishing economic sanctions on the Iranian regime. These powerful sanctions will remain until Iran changes its behavior" Trump said while noting that Iran appears to be "standing down."

Buying following Trump's speech ran the Nasdaq Composite to record highs while the S&P 500 and Dow Jones Industrial Average finished just off their own peaks. The major averages gave up some of their gains just ahead of the closing bell after there were reports of two explosions in Baghdad.

Every sector in the S&P 500 rallied with the exception of energy and utilities, which fell in tandem with oil prices.

Ticker Security Last Change Change % I:DJI DOW JONES AVERAGES 27901.98 -130.40 -0.47% SP500 S&P 500 3357.01 -28.48 -0.84% I:COMP NASDAQ COMPOSITE INDEX 10910.27678 -140.19 -1.27%

West Texas Intermediate crude oil plunged 4.9 percent to $59.61 per barrel level after hitting an overnight high of $65.65. Meanwhile, Brent crude oil, the international benchmark, fell to $65.63 per barrel after rallying to $71.99 on Tuesday evening. Energy stocks, like ExxonMobil and Chevron, were also under pressure.

Gold reversed course from an almost 7-year high of $1,613.30, which came in the immediate aftermath of Tuesday night's attack. The precious metal closed down $19.90, or 1.3 percent, at $1,554.10 an ounce.

Ticker Security Last Change Change % USO UNITED STATES OIL FUND L.P. 29.23 +0.53 +1.85% XOM EXXON MOBIL CORPORATION 37.80 -0.01 -0.03% CVS CVS HEALTH CORPORATION 58.41 +0.93 +1.62% GLD SPDR GOLD SHARES TRUST - EUR ACC 182.96 -1.01 -0.55%

Elsewhere, Defense stocks traded mixed as Raytheon paced the gains and Northrop Grumman trailed.

Boeing shares were under pressure after a 737-800 aircraft crashed shortly after takeoff from Tehran’s Imam Khomeini International Airport, killing all 176 people aboard.

Tesla shares squeezed higher after receiving after Argus Research raised its price target to $556 from $396 late Tuesday. The electric-vehicle maker has gained 17.6 percent so far this year.

Ticker Security Last Change Change % GD GENERAL DYNAMICS CORPORATION 144.59 -2.19 -1.49% NOC NORTHROP GRUMMAN CORPORATION 343.84 +0.37 +0.11% LMT LOCKHEED MARTIN CORPORATION 395.94 +0.36 +0.09% RTN n.a. n.a. n.a. n.a. BA BOEING COMPANY 167.53 +0.07 +0.04% TSLA TESLA INC. 423.43 -18.33 -4.15%

On the earnings front, shares of Walgreens Boots Alliance were lower after the drugstore chain reported disappointing fiscal first-quarter results.

Meanwhile, homebuilder Lennar gained after fourth-quarter profit and revenue topped expectations and the company forecast 2020 sales above estimates.

Constellation Brands announced its fiscal third-quarter profit and sales were boosted by strong demand for its beer.

Macy’s rose after announcing it will close 28 stores, it also reported holiday season comparable sales fell 0.7 percent, reflecting a “strong trend improvement from the third quarter."

Ticker Security Last Change Change % WBA WALGREENS BOOTS ALLIANCE INC. 37.21 +0.93 +2.56% LEN LENNAR 78.14 -0.75 -0.95% STZ CONSTELLATION BRANDS INC. 192.21 -0.99 -0.51% M MACY'S INC. 6.86 -0.12 -1.72%

U.S. economic data out Wednesday morning showed private-sector payrolls increased by 202,000 in December, topping the 160,000 that economists surveyed by Refinitiv were expecting.

Treasurys slumped, causing the yield on the 10-year note to climb by 4.7 basis points to 1.87 percent.

In Europe, Germany’s DAX led the advance, up 0.7 percent, while France’s CAC was higher by 0.3 percent. Britain’s FTSE 100 was little changed.

CLICK HERE TO READ MORE ON FOX BUSINESS

Overnight, markets were hit hard in Asia. Japan’s Nikkei lost 1.6 percent, China’s Shanghai Composite fell 1.2 percent and Hong Kong’s Hang Seng shed 0.8 percent.