Less than one day after Donald Trump’s election as president, we could already add one more prediction to the dustbin of history: that a Trump victory would lead to immediate disaster for the financial markets. The warnings came from every direction in the weeks and months leading up to Nov. 8. An equity analyst told New York magazine that “Trump is widely considered to be reckless and Clinton is widely considered to be a friend to Wall Street.” Two highly cited university economists using advanced statistical techniques estimated that “a Trump victory would reduce the value of the S&P 500, the UK, and Asian stock markets by 10-15%.” Yet three major stock indexes-the Dow Jones Industrial Average, the S&P 500 and the Nasdaq-were all up on Nov. 9. Not since Bill Clinton’s re-election in 1996 have all three increased simultaneously the day after a presidential election. The Dow gained more than 250 points Wednesday, and closed the week at a record high. You might wonder: What happened? But there’s a better question: What didn’t happen? The days before the election were rife with uncertainty. There were fears of terrorist attacks, a contested election, violence in the streets, a breakdown of society-what you might call the end of America. (We exaggerate, but have you seen what disappointed voters are posting on Facebook and Twitter?) These fears-warranted or not-were amplified by journalists who struggled to maintain objectivity. Then they bounced around the echo chamber of social media. By and large, none of these fears materialized. Mr. Trump gave a conventional victory speech. It was matched by Hillary Clinton’s equally uneventful concession speech. The election is not contested. America has a new president and is on a path toward another peaceful transition of power. Stock prices reflect millions of individual decisions, so we need to be cautious in attributing intentions to markets. But in the days after the election, investors seemed to be reacting to the stability of America’s democratic institutions. To the extent that anything can be gleaned from the financial rally, it is this: On balance, having the election definitively resolved has outweighed immediate concerns about what President-elect Trump might do in the days ahead. How can we be so sure? Look at two pieces of data: first, the movement in the futures markets-essentially bets on where stock prices are headed. Early Wednesday morning, when a Trump victory began to seem likely, S&P futures plunged by 5%. That was a decline consistent with analysts’ fears. Second, consider what happened when U.S. markets opened on Wednesday at 9:30 a.m. It had become clear in the light of day that the country had “survived.” The S&P, for instance, began the trading day within points of where it had closed the day before, and it headed upward from there. This pattern is strong evidence that what was really rattling investors wasn’t the prospect of President Trump, but rather the fear of what might ensue after a messy, indecisive election. Once that chaos was averted, the worry subsided. That isn’t to say there are no winners and losers in the markets after a Trump victory. The Mexican peso was off about 8% Wednesday, tied to questions about what President Trump will do regarding trade and the North American Free Trade Agreement. Biotech companies, whose drug-pricing practices Mrs. Clinton had called “outrageous,” jumped about 10% the day after the election. As many have noted, there are striking parallels with the British vote in June to leave the European Union. There, too, the public was inundated with dire predictions about what would happen to the financial markets if Brexit won. Immediately after the vote stocks nose-dived, with the S&P down more than 3%. But that index fully recovered within a couple of weeks. Perhaps the biggest difference is that the recovery after Mr. Trump’s victory was nearly instantaneous. There is still significant uncertainty about what President Trump will do, how Brexit will be resolved, and a host of other geopolitical issues. Investors would be wise to expect continued volatility in financial markets. And if Mr. Trump makes good on many of his economic and foreign policy promises, the markets could reverse course. But the financial lesson from last week is that the clarity of elections-having a decisive winner and a gracious loser-may matter nearly as much as, and in some cases more than, the outcome. This was an exhausting campaign. But those who worry about the country’s future should take solace in the way markets responded to an unexpected Trump victory. America’s political system is more resilient than many experts would have us believe.