Stocks swung into the red Wednesday morning as investors processed President Donald Trump's Tuesday night rally in Phoenix, during which the president teased the prospect of a government shutdown if lawmakers don't agree to fund a border wall and the possible termination of the North American Free Trade Agreement.

The Dow Jones industrial average was down nearly 100 points from Tuesday's close within minutes of the opening bell. The Nasdaq composite index, likewise, was briefly down roughly half a percentage point, as was the Standard & Poor's 500 index.

Safe-haven assets like gold traded higher Wednesday morning, as did other low-risk assets like the Japanese yen. Appearances seemed to indicate investors were spooked by Trump's Tuesday night comments and the economic impact they could have if the president follows through.

In his wide-ranging remarks , Trump rehashed his response to racial violence in Charlottesville, Virginia, accused the media of "trying to take away our history and our heritage," and hinted at a potential pardon for ex-Sheriff Joe Arpaio of Arizona's Maricopa County. Arpaio was convicted last month of criminal contempt of court for continuing immigrant-targeting patrols in defiance of a court order.

But it was likely Trump's references to big-ticket economic items that most vexed investors during the early hours of Wednesday morning. For example, Trump said he doubted the ability of U.S. Trade Representative Robert Lighthizer and his counterparts from Canada and Mexico to agree on a NAFTA restructuring that he would feel comfortable endorsing.

"Personally, I don't think we can make a deal," Trump said. "I think we'll probably end up terminating NAFTA at some point, OK? Probably."

The comments came as the Trump administration's rhetoric regarding NAFTA renegotiations has appeared to ramp up of late. Lighthizer said in a statement last week that he and Trump believe "NAFTA has fundamentally failed many, many Americans and needs major improvement."

The deal encompasses two of America's biggest trade partners, and many analysts fear exports would drop and prices for imported products would soar should NAFTA be scrapped entirely. Industries in which supply chains are spread across borders – such as auto and clothing manufacturing – could be among the most severely impacted.

Trump on Tuesday also touched on his promised border wall with Mexico. Out on the campaign trail, the president vowed to make America's southern neighbor pay for the barrier. But on Tuesday night, the president suggested he wouldn't sign off on a congressionally approved budget unless lawmakers allocated money to fund the wall's construction – a threat that raises the prospect of a government shutdown.

"Build that wall. Now the obstructionist Democrats would like us not to do it," Trump said. "But believe me, if we have to close down our government, we're building that wall."

Losses on Wall Street weren't catastrophic, however. And some have chalked up the relatively muted response to Trump's comments to lowered expectations for what Congress and Trump will accomplish in areas like tax reform.

"We were pricing a lot of that in [at the beginning of the year]. We have priced all of that, virtually, out," Krishna Memani, the chief investment officer of OppenheimerFunds, told CNBC in an interview Wednesday. "I think if we were relying on tax reform to drive the market higher, the market would have been much higher than where it is right now."

Indeed, although Trump's team could unveil some sort of overarching tax plan in the early fall, possibly as soon as September, many are skeptical that enough lawmakers will rally around a single plan to make the tax revisions permanent rather than just temporary.

Meanwhile, the president's Charlottesville response and continued bashing of lawmakers in his own party – including Sens. John McCain and Jeff Flake of Arizona and Senate Majority Leader Mitch McConnell of Kentucky – have thrown the viability of his overarching economic agenda into question.