Investors loved it. Bankers loved it. Corporate executives loved it. The money showered upon them from tax cuts and the seemingly invincible bull market mollified even those who privately grimaced at the president’s pronouncements and social policies.

But nobody loved it like Mr. Trump. He has tweeted about the stock market at least 131 times since becoming president. He kept a running tally of stock market records — 135 by his last count, on Dec. 19. He personalized the rally, referring to “my stock market gains.”

In some ways, Mr. Trump, with his fixation on the markets, has resembled old-school corporate chieftains like Sandy Weill. As chairman and chief executive of Citigroup, Mr. Weill kept moment-to-moment tabs on his company’s stock price, viewing it as the best quantifiable measure of his performance. But Mr. Weill got out before the reckoning. Two years after he retired in 2006, Citigroup, deep in debt and burdened with toxic assets after years of financial recklessness, required $45 billion in taxpayer bailouts.

By taking credit, over and over, for the stock market’s record run, Mr. Trump arguably set himself up to be blamed for its record fall. (Mr. Trump has repeatedly insisted that he be measured by the market’s performance starting on Nov. 9, 2016, the day after his election, rather than when he took office. By that measure, stock markets are still up on his watch, though not by much.)

So deeply has Mr. Trump interwoven his fortunes with those of the markets that plenty of members of the Trump-loathing left have watched markets plunge with a dose of schadenfreude.

“If you politically live by the stock market, you can politically die by the stock market,” said Neera Tanden, the president of the Center for American Progress, a liberal think tank in Washington. She said she hoped that, with Mr. Trump no longer able to bask in the warmth of an epic market rally, the public would have a clearer view of his deficiencies. But, she added, “I’m not rooting for the market to tank.”