On Jan. 25, 2017, newly inaugurated President Trump repeated his baseless claim that millions of undocumented immigrants illegally voted in November’s election. He signed an executive order directing construction of his signature border wall. And a House committee announced it would start investigating possible Russian interference in the election.

The S&P 500 hit an all-time high.

On Feb. 9, an appeals court refused to reinstate Trump’s controversial travel ban. Presidential adviser Kellyanne Conway came under fire for urging Americans to buy Ivanka Trump’s products. And multiple newspapers reported that then-National Security Adviser Michael Flynn had discussed sanctions with Russia’s ambassador to the U.S. before Trump took office.

The S&P 500 hit an all-time high.

On May 17, The New York Times reported that fired FBI Director James Comey had written a memo documenting Trump’s alleged efforts to slow the Russia investigation. This time, markets plummeted, and observers began to ask whether investors were waking up to the risk posed by Trump.

One week later, the S&P 500 hit an all-time high.

Time and again in recent months, supposed experts (including me) have suggested that turmoil and uncertainty in Washington — the Russia investigation, the travel ban, the on-again off-again health care bill — was on the verge of bringing the long stock-market rally to an end. Time and again, the markets have proved doubters wrong. (The latest grim example came Wednesday, when House Majority Whip Steve Scalise and several congressional aides were wounded by a gunman in Virginia. Stocks barely budged.)

Investors’ apparent indifference to the tumultuous start to Trump’s presidency has left some experts shaking their heads. After all, we are constantly told that markets hate uncertainty. And Trump’s first months in office have brought plenty of uncertainty: He hasn’t released specific proposals for much of his domestic agenda; he has appeared to question core elements of American foreign policy, including the U.S. commitment to NATO; and the ongoing Russia investigation has led even some Republican members of Congress to discuss the possibility of impeachment.

“Washington and Wall Street cannot both be right,” Financial Times columnist Edward Luce wrote last week. “Washington and the world are in a state of fear. On the other, Wall Street sees only blue skies ahead.”

So why aren’t investors more fearful? It’s hard to know for sure — interpreting market behavior is usually a sucker’s game. But it’s possible to lay out a few, not mutually exclusive, theories:

Theory 1: The rally has nothing to do with Trump

When the market soared right after Election Day, many analysts attributed it to a “Trump bump”: Investors were buying stocks in anticipation of tax cuts, deregulation and other policies that would help corporate bottom lines. So with much of Trump’s agenda now stalled — tax reform, in particular, now seems likely to wait until next year — it would be logical to expect the rally to fade.

But maybe the reason the Trump bump hasn’t disappeared is that it never existed in the first place. It’s probably true that the immediate post-election rally was connected to the vote; the S&P 500 jumped 3 percent in the two weeks after Election Day. But it isn’t clear whether investors were applauding Trump’s win or, for example, were relieved that the vote had yielded a clear outcome. (Recall that there had been concerns that Trump might challenge the election result had he lost.) And beyond the first couple weeks, there isn’t much evidence of a Trump effect at all. Stocks have continued rising in 2017, but at more or less the rate they rose in early 2016.

It’s possible, of course, that stocks would have fared worse if Trump hadn’t become president. It’s also possible they would have done better. (It’s worth noting that before the election, many experts predicted a Trump win would be bad for markets, a claim that always seemed dubious.) But absent compelling evidence in either direction, the safest assumption is probably that the election didn’t have a strong effect in either direction. Presidents, after all, have relatively little control over the near-term direction of the economy. And there are other factors that could explain the recent rally. The U.S. economy has continued to improve, for example; the Federal Reserve on Wednesday announced its latest interest-rate hike, a vote of confidence in the recovery. The rest of the world is looking healthier, too, an increasingly important factor for stocks as U.S. companies sell more products overseas. Sara Johnson, senior research director at IHS Markit, an economic analysis firm, noted that the strongest market gains over the past year have come in emerging markets, not in the U.S., a sign that Trump’s role in the rally is at least limited.

“It’s not surprising to see some strength this year,” Johnson said. “Globally we’re in an environment of more risk-taking … and that tends to be an environment in which stock markets gain.”

Theory 2: Investors still have faith in the GOP

Even if the market rally is due, at least in part, to investors’ hopes for Trump’s term, it isn’t clear that his early-term struggles should necessarily dampen their enthusiasm. The Russia investigation has probably weakened Trump’s already limited ability to push his policies through Congress, but that doesn’t mean nothing will get done. Republicans, after all, still control the House and Senate. And despite various delays and setbacks, core parts of their agenda are moving ahead. They have already rolled back dozens of Obama-era regulations. The fate of the Republican health care overhaul is far from certain, but a partial repeal of the Affordable Care Act (including the elimination of the employer mandate and the rollback of its tax surcharges) seems likely. (And even if Congress doesn’t pass a bill, the administration has already begun working to roll back some of its provisions.) Broader tax reform has been slow to get off the ground, but most experts still expect an eventual deal that results in lower business taxes.

Not coincidentally, those are all areas where Trump and congressional Republicans are largely in agreement. And they also happen to be among the most popular policies among investors and business leaders. On the other hand, many business leaders were less keen on other elements of Trump’s agenda such as unwinding trade deals and limiting immigration — policies that also enjoy less broad support among congressional Republicans.

Trump’s early-term struggles, then, could pose less of a challenge to his business-friendly tax and regulatory policies than to his more populist policies. In fact, to the extent that power shifts from the White House to Congress — and it is too soon to say that is happening — that could be good news for investors.

“You get a Romney-Bush, centrist Republican package,” said Steven Blitz, chief U.S. economist for TS Lombard, an investment firm. “But what you don’t get it is the populist package that he ran on.”

Theory 3: The markets are missing the big risks

So far, we’ve been working on the assumption that investors are basically correct in their assessment of the situation: Sure, Washington is a mess, but that doesn’t really matter; or sure, Washington is a mess, but Republicans will still manage to cut taxes. But there’s another possibility: Wall Street is wrong.

Investors could be misreading the situation in big ways or small ways. It’s possible, for example, that investors, on average, expect Republicans to pass a tax cut package early next year. But maybe it takes Congress longer, or maybe Republicans never get their act together at all. That would probably be bad for stocks, but in a subtle way. Investors would gradually realize that tax reform was in trouble, and they would start pricing that into their decisions. Given all the other variables that are constantly affecting stock prices, we might not even be able to discern the effect.

But it’s also possible investors are failing to account for something major. Maybe Trump really will start a trade war with China, sparking a global recession. Maybe Trump will start a war war, in Syria or North Korea. Or maybe his inexperience with international affairs will lead him to make some other kind of blunder — setting off a crisis in the Middle East, for example.

Then there is the debt ceiling. The Treasury Department has said that if Congress doesn’t vote to raise the federal borrowing limit by sometime in early September, the government will be unable to pay its bills — a potentially catastrophic event that could set off a global financial crisis and do lasting damage to the U.S.’s ability to borrow money. Debt limit votes used to be routine, but in recent years, conservative members of Congress repeatedly used the process to gain leverage in their negotiations with the Obama administration. That kind of brinksmanship seems less likely with Trump in office, but not impossible — at times, members of Trump’s own administration have seemed to disagree on the issue. “It would be self-defeating not to [raise the limit], but stranger things have happened,” Johnson said.

Markets are notoriously bad at assessing this kind of “tail risk” — events that are unlikely to occur but that matter a lot when they do. Just think of the 2008 financial crisis, when markets failed to foresee how the collapse of the mortgage market could destabilize the entire financial system. Investors, in other words, might be right to shrug off the endless headlines about Trump’s dysfunctional White House; it’s the risks that markets aren’t accounting for that could pose the real threat.