New York (CNN Business) Just three weeks ago, President Donald Trump was celebrating.

US stocks had gained 58% since his election day, and he tweeted "Highest Stock Market In History, By Far!" Later that day, both the S&P 500 and Nasdaq Composite closed at all-time highs , as investors hoped the coronavirus outbreak was slowing . Markets also rallied because Bernie Sanders was the presumptive Democratic nominee for president — and investors believed Trump would easily beat Sanders in a general election.

How quickly the story has changed since then.

On Wednesday, the World Health Organization declared the novel coronavirus a pandemic, citing 118,000 cases and more than 4,000 deaths, globally. And former Vice President Joe Biden is now the odds-on favorite to get the Democratic nomination.

In the weeks since Trump's triumphant tweet, the coronavirus outbreak has disrupted global supply chains, triggered the cancellation of major conferences and public events, and led companies to cancel travel plans and enact emergency work-from-home policies . All those disruptions could dramatically slow economic activity and even usher in a global recession , economists warn.

Which is why stocks have been hammered recently.

Since the market's high on February 19, the S&P 500 has fallen by 644.8 points, erasing more than half of the gains it had made since Trump was elected in 2016.

As of Wednesday's market close, the S&P 500 was up 28% since November 8, 2016 — a far cry from the 58% gain it had sported just three weeks ago.

Ultimately, there's only so much impact any one president can have on the stock market — especially amid a global public health emergency. Long-term fundamentals like corporate earnings, interest rates, the labor market and economic growth usually are more important drivers for investors than any one president or political cycle.