The turbulence on Wall Street comes at an especially bad time for a president who loves to brag about the stock market.

The Dow plunged 363 points on Tuesday, one of its worst days since the 2016 election -- hours before President Trump's first State of the Union address.

Unlike his predecessors, Trump has obsessed over the market. He frequently tweets about market milestones, pointing to the monstrous gains as evidence that his policies are working.

"The stock market is smashing one record after another," Trump told the elite crowd at the World Economic Forum in Davos, Switzerland, last week. The president even mentioned the exact number of record highs -- 84 -- that the S&P 500 had notched since his election.

But becoming Wall Street's cheerleader-in-chief has risks, as Trump is being reminded this week. The Dow just posted its worst two-day percentage decline of his presidency.

The problem with bragging about the Dow's day-to-day moves is that every president eventually encounters a market storm. Attaching yourself too closely to the good days can make it harder to detach from the bad ones.

"If you live by the sword, then you die by the sword," said Sam Stovall, chief investment strategist at CFRA Research.

Stovall said that while the party in power "always wants to take credit" for what happens on its watch, Trump may face questions about blame for market drops.

Related: Wall Street suffers rare bout of selling

Of course, investors have a lot to smile about in the Trump era.

The S&P 500 zoomed 24% during his first year in office. The S&P 500 surged 41% during President Obama's first year, but Trump's performance is the second-best since World War II, according to CFRA Research.

Much of the Trump rally occurred in the days and weeks after his election. That's when investors realized Republicans were suddenly positioned to pass historic tax cuts.

Since the 2016 election, the Dow has spiked about 8,000 points, or 44%. And it's done that almost nonstop -- with unusually low volatility.

While Trump would like to claim most of the credit, the market enthusiasm, some would say euphoria, has been driven by more than just him.

Investors are excited that the global economy is finally firing on all cylinders. U.S. growth has been solid, and is expected to continue in 2018. Europe has awakened from a long hibernation, surpassing U.S. growth last year. Global economic growth last year was the best since 2010 as every major country or region grew.

The strong economy has enabled companies to mint money. Corporate profits have raced to all-time highs.

And there's no doubt that Trump's signature legislative achievement, massive corporate tax cuts, fired up Wall Street. Companies are saving a ton of money, and a sizable chunk of that will go toward rewarding shareholders with share buybacks, dividends and acquisitions.

Trump's vow to roll back regulation has also helped instill confidence in CEOs and small businesses who complained they were drowning in red tape.

Related: Where the current economic boom ranks in history

All of those things are still true -- even though the market is experiencing a rare bout of selling. The retreat is a fresh reminder of how moody the market can be. Analysts have long been calling for an even bigger pullback.

Trump had the luxury of inheriting a solid economy and a steadily rising stock market. The bull market began in March 2009 in the ashes of the Great Recession. It's 106 months old. All but 15 were before Trump was elected.

To be sure, Trump isn't the first president to talk about the stock market. Obama even mentioned it in several State of the Union addresses. "The stock market has come roaring back," Obama said in his 2011 speech.

Yet Trump's predecessors tended to talk about the market's longer term moves, not their day-to-day records.

Trump, on the other hand, has actively rooted for the market to go higher. "Now we have to go up, up, up," Trump told ABC News after the Dow hit 20,000 a year ago.