President Trump arrives in the Oval Office in November to deliver remarks about the job market.Carlos Barria / Reuters

It has been a tumultuous year for Donald Trump, brimming with legal scandals and high-profile White House departures. But the president should give thanks this holiday season, because he is the recipient of an extraordinary present—an economy gift-wrapped and tied with a big, beautiful bow.

After a terrible recession and a slow recuperation, America’s economy is in a record-setting mood these days. The Dow has set an all-time high 70 times in 2017—once every five days—while the unemployment rate has neared an all-century low. Manufacturing confidence is higher than ever, and confidence among home builders has matched an all-century high. A yuletide glow illuminates even some of the darkest of corners of the economy: After a rough year for traditional retailers, holiday sales are projected to hit their highest level in three years.

Is this happening because of President Trump? Yes, according to President Trump.

“The reason our stock market is so successful is because of me—I’ve always been great with money,” Trump told reporters in November. “Virtually no President has accomplished what we have accomplished in the first 9 months, and [the] economy [is] roaring,” he said on Twitter. “At least we can all agree the economy is better under President Trump,” White House spokesperson Sarah Huckabee Sanders said, while also crediting job growth to a “Trump miracle.”

Like so many miracles, this is revisionist history. Even if Trump’s first 100 days had produced a bevy of new legislation, it typically takes about a year for policy to affect national economic statistics. But Trump’s first 100 days produced no major legislation, despite effectively unwinding Obama-era regulations for labor, environmental, and consumer protections. Instead, Trump is treating the U.S. economy the way he might treat the licensing of a fully built hotel: He has slapped his surname on the facade and shifted around the interior decor. But the foundation, scaffolding, and architecture of the thing either preexisted his term or are beyond his control.

Consider the stock market, whose performance in 2017 has been pretty remarkable. The Dow has added 5,000 points in a calendar year for the first time ever. And, to Trump’s credit, he’s probably responsible for some of those gains. Corporations have benefited from the president’s emphasis on tax cuts and deregulation. Indeed, corporate tax reform will increase profits, especially for large telecoms, large banks, and retailers. There is also evidence of Trump’s policies helping specific sectors. For-profit prisons and for-profit colleges—both of which were targeted by the Obama administration—soared after the election of President Trump and have since outperformed the rallying stock market.

But the overall rise in equity prices is part of a long, steady bull market. The S&P 500 has grown by about 20 percent under Trump. That’s great, but it’s actually less than the one-year increase in 2009 (26 percent) or, to pick a year that wasn’t starting from rock bottom, 2013 (32 percent) under Obama. What’s more, the U.S. stock market has actually done worse than most of the developed world in 2017. As a percent change in dollars, the U.S. has lagged behind the stock indices of France, Germany, Greece, Italy, Spain, Japan, China, India, Singapore, South Korea, Taiwan, Argentina, and Chile.

The most important reason for this global boomlet is somewhat boring: After eight years of central banks printing money to help businesses and companies recover from the global financial crisis, the entire world finally seems to be growing. Global trade in 2017—which has little to do with White House policy—has grown at its fastest pace in the last five years. “The percentage of countries in major expansion mode is about as good as it can get,” Michael Cembalest, the chairman of market and investment strategy at JP Morgan, told me. In short: With or without Trump, there would be a historic rally in U.S. stock prices, because American multinational corporations (which make almost half of their revenue from overseas) are enjoying a rare moment of nearly universal worldwide growth.

What about a Trump miracle for blue-collar workers? Trump promised “to restore manufacturing in the United States” during the campaign. And voila, manufacturing employment had its best year since 2014, with the unemployment rate in steel manufacturing declining to 1.4 percent (not a typo). Trump also promised to revive the mining industry during the campaign. Indeed, after declining for several years, mining jobs have suddenly rebounded under Trump, another ostensible victory for White House policy.

But upon closer examination, these aren’t Trump miracles. They’re part of a worldwide economic story that is affecting the U.S., because the U.S. is part of the world. The dollar has fallen 10 percent since December 2016—a gift for U.S. exporters—thanks to higher growth in Europe and the appreciation of the euro. Meanwhile, factories are on fire just about everywhere. By one measure, global manufacturing has surged higher than global services, a rare feat for an expanding global economy, and one that has nothing to do with the president.

There is anecdotal evidence that some mining companies were encouraged by Trump’s rhetoric and deregulatory policies. But far more importantly, the global recovery has led to a global energy boom, particularly due to demand from China. The price of coal doubled in the first nine months of 2016. This has created new demand for mining contractors in western Texas and the swath of the country running from Utah through Wyoming into Montana and North Dakota. These contractors, working in what the Bureau of Labor Statistics calls “support activities,” have accounted for almost all the mining sector’s job growth.

The common theme to these stories of markets, manufacturing, and mining is that economics tends to be driven by faceless forces rather than the familiar face in the Oval Office. It’s generally fanciful to think that the commander-in-chief has a magical ability to control the economy, for good or bad. (The major exceptions to this rule are during crises, like the Great Depression and Great Recession, when immediate government spending is critical.) The 1980s recovery is often credited to Ronald Reagan. But now, some of his strongest supporters acknowledge that the key factor was the fact that the Fed loosened monetary policy in the early 1980s. On the Democratic side, the economy didn’t take off in the 1990s just because Bill Clinton found the perfect marginal tax rate. Rather, he presided over the integration of the internet into the services economy, which coincided with the large Baby Boomer generation entering its peak earnings years. This combination probably would have led to a productivity boom under almost any president.

Claiming individual credit for global phenomena is a risky long-term strategy for any president. If the price of energy plummets, the White House will find that the Trump miracle will end, through no fault of Trump. Between 2010 and 2014, Obama presided over a 30 percent boom in mining jobs, thanks to a burst in energy demand and a fracking revolution whose technology was decades in the making. Two years later, all of that net job growth had disappeared, as the global price for natural gas plummeted. Obama wasn’t the captain of the global market for energy; he was merely a powerful bystander. That’s just how it is: The president depends on the economy far more than the economy depends on the president.