After a brief stumble, the stock market returned to its upward march last week and hit another high. This optimism has left many people confused, even infuriated. Why isn’t Wall Street being affected by all the crazy news — including rumors of impeachment — coming out of Washington? Where is the Trump Slump?

So far, there isn’t one, and that’s good news for investors but also even for ideological opponents of the president. I’ve examined stock markets in countries around the world, looking at data over the past three decades. My research shows that a country’s stock market often outperforms its peers when a new leader comes to power in emerging countries.

But there is no such positive effect in developed countries. Countries like the United States have structural guardrails in place, like strong independent courts, central banks and other checks on power, that make it more difficult for a single leader to change the nation’s direction.

Compare political scandals, for example. In Brazil, the market is struggling to recover after falling nearly 15 percent in dollar value on May 18 perhaps in response to the blockbuster news of a cover-up that could cost the president his job.

In the United States, the stock market fell during the Watergate scandal but for reasons that had little to do with Richard Nixon and much to do with the stagnant economy and inflation. And stock prices rose steadily during the investigations and impeachment of Bill Clinton, until the 1998 collapse of the hedge fund Long-Term Capital Management threatened to trigger a global financial crisis. The same holds for other political scandals, like Teapot Dome and Iran-contra.

It is a mistake, then, to view the markets through an ideologically colored lens.

The data is decidedly more mixed on whether the United States market does better under a Republican or a Democratic administration. If anything, the market over time seems less and less inclined to care which party is in power.

I know plenty of right-wing ideologues who, convinced that President Barack Obama was leading America to ruin, missed out on the market’s long bull run. Similarly many Democrats now think President Trump is taking the country down and assume that stock prices will follow.

The stock market is best understood not as a presidential poll but as a barometer of the nation’s current economic mood, and it remains buoyant now for reasons unconnected to the White House.

For a few weeks after President Trump’s victory, Wall Street was indeed buzzing over how his plans to cut taxes and red tape would stir “animal spirits” and promote American business, albeit at the expense of foreign rivals. Money was coming back to the United States, driving up the value of the dollar. Six months later, the main reason for the market’s continued rise has more to do with global rather than local factors. The “Trump bump” is long gone.

Global growth has picked up over the past few months, and the worst fears that caused a short-term slump in Wall Street last year — like a possible breakup of the European Union after Brexit or a financial crisis in China — have not materialized. The American economy continues to grow at a steady clip of around 2 percent, while the economies of Europe and Japan are now stronger than at any time since the crisis of 2008.

The American stock market reflects those trends. Despite Mr. Trump’s criticism of “globalists,” the more internationally oriented companies have outperformed their domestic peers significantly since Inauguration Day. The global forces lifting the United States market have in the meantime been lifting foreign stock markets even faster this year.

Similarly, the American dollar has given up all the gains it recorded in the immediate aftermath of the November election, and the Mexican peso has clawed back most of the losses it incurred when the markets were taking President Trump’s threats against the North American Free Trade Agreement more seriously.

On Wall Street today, the chatter about Trumponomics is fading, because many people no longer expect him to accomplish much, for better or worse, whether pushing tax reform or triggering trade wars. Some analysts still worry about how a tax-cut plan based on unrealistic growth assumptions could further bloat the budget deficit, or how limiting immigration could undermine the economy.

But those story lines are expected to play out at a glacial pace, well outside the market’s forecast horizon, which is measurable in months, not years. Corporate profits have started to revive in recent months based on a recovering global economy. As long as that continues and the cost of money remains close to zero, courtesy of the Fed, the default path for the market is up.

None of this is to suggest that there are no risks to the bull market, now in its ninth year. Stocks in the United States have seldom risen for so long without a major setback and have never been more expensively valued, outside the tech boom of the late 1990s. History shows that bull runs tend to last until the next recession starts, so the question is where the next downturn comes from.

If emerging inflation pressures prompt the Fed to raise interest rates more quickly, the economy could stumble and take the market with it. More significantly, there are still threats to the world economy, including China’s debt bubble. If it bursts, it could cause the next global recession, hitting the American market hard.

So there is much to worry about in the markets, but it is important to worry about the right things. The cloud of scandal around the White House is not high on the list. Mr. Trump’s mercurial ways may be a source of great concern or indifference, depending on your ideological leanings. But Wall Street doesn’t seem to care one way or other.