President Donald Trump participates in the signing ceremony for the First Step Act and the Juvenile Justice Reform Act in the Oval Office of the White House December 21, 2018 in Washington, DC.

"He always has had really big pros and really big cons. Some things he did early were very big pros. He's just created so much uncertainty,' said Ward McCarthy, chief financial economist at Jefferies. "He seems to be destabilizing. The resignation of Mattis and the government shutdown are troubling." McCarthy said those two factors appear to be weighing on the stock market.

But now with the stock market well off its highs, the president has increasingly become a source of uncertainty and volatility. Trump and Washington politics are moving higher up the list of risks for markets, already unnerved by uncertainty over the economy, Fed interest rate hikes and trade wars.

For much of his presidency, the stock market has loved President Donald Trump , trading higher on his pro-growth policies, like tax cuts, as well as his hands-off regulatory stance.

"When the market gets pessimistic about the shutdown, it's not really about a shutdown. It's really where is this president on policy and what's going to happen when the debt ceiling looms?" said Luke Tilley, chief economist at Wilmington Trust. "What's going to happen when it comes around again in March? ... If we ever get to the debt ceiling and couldn't fund ourselves, that would be a seismic market event."

Much of the market's decline this week was blamed on the Fed, but the sparring in Washington was definitely a factor.

Trump last week said it would be on him if the government closes down, but now he is blaming Democrats .

Stocks have fallen sharply in the past several days, against a backdrop of political squabbling over a continuing resolution to keep the government funded. The president, pushing his campaign promise of a border wall, is demanding the barrier's funding become part of the deal or else there will be a partial shutdown of the government Friday night.

To be sure, the Dow Jones Industrial Average is still up 23 percent since Trump's election, but that may not matter if it drops into a bear market on his watch. Through midday Friday, it was just 4 percentage points short of that mark.

Peter Boockvar, chief investment strategist at Bleakley Advisory Group, said that Trump's tariffs have been worrying the market but the president himself really spooked it when he called himself "tariff man" in a tweet, shortly after his meeting with Chinese President Xi Jinping.

tweet

"I think what really set the market off was when he called himself Mr. Tariff. That was right after the Trump-Xi meeting, said Boockvar. "People came out of that meeting hopeful. He said 'tariff man' and that began the biggest sell-off of December."

Some analysts are looking for a quick resolution for a shutdown, which would not impact the economy. But Cowen analysts said it could stretch on longer than expected.

"Getting the ~100 Lame Duck lawmakers who are not returning for the new Congress to come back to Washington after Christmas is going to be a really long putt. And what will have changed? On January 3, the Democrats will take the House. They will pass some kind of clean bill to reopen the government that will then go to the Senate...not sure what happens after that. This shutdown could go on for a long time," the Cowen analysts wrote.

The market was even more unnerved Friday by the fact that Defense Secretary James Mattis said he would retire in February because he does not agree with Trump. Shortly before Mattis stepped down, Trump announced that the U.S. would pull out of Syria.

"He's losing people that everybody thought would be the fire extinguishers. He wouldn't accidentally go to war with a guy like Mattis around," said Art Cashin, UBS director of floor operations at the New York Stock Exchange. Cashin said Mattis is the last of other respected appointees who have left the White House, like former economic advisor Gary Cohn.

"Mattis is tremendously respected by the military," said Cashin. "Santa is not being good to the president ... [Trump's] going to be destabilizing, and you see what it's been doing to the stock market."

Cowen analysts said the Mattis situation takes the country into unchartered territory. "Not in our memory has U.S. national security strategy and policy been whipsawed by two critical strategic decisions in which the U.S. President completely ignored the advice of his national security team and in which an incredibly well regard Defense Secretary has resigned in protest over his conflicting views with the President. To us, this is unknown territory," a Cowen anaylyst wrote..

Dan Clifton, head of policy research at Strategas, said the budget brawl is creating secondary effects.

"Because Trump is not getting the wall, he pulled out of Syria by Twitter. This triggered a set of effects including Mattis resigning. Mattis leaving seems to be a far bigger event. The adults in the room are all out. With Mattis gone, does this make it easier to put EU auto tariffs in place which required DoD sign-off? How about Jay Powell being removed as Fed Chair?" he wrote.

Clifton also commented that Trump was unpredictable, agreeing to no shutdown on Wednesday but returning to it Wednesday night after he was criticized by conservative media. "This is going to make the more important policy issues for financial markets, the debt ceiling and sequestration, tough to solve in 2019." Clifton noted..

Another important turn of events are the cracks forming around Trump.

"Republicans are starting to turn on Trump. There are cracks developing in the structure. The economy was holding Trump up and that is fading. Mattis gave cover to Republicans and he is now leaving. And there is news of Mueller releasing a report in mid-February as Trump's GOP support begins to crack," Clifton wrote.