There seems to be a bizarre disconnect between the surging U.S. stock market and the sad state of American politics. Winston Churchill supposedly quipped, “Americans always do the right thing, after they have tried everything else.” But in light of the impending rematch between Joe Biden and Donald Trump in this year’s U.S. presidential election, Churchill’s observation needs adjusting: Americans, apparently, do the right thing only after they have tried everything else twice.

What explains this disconnect between the stock market’s buoyancy and the crisis facing American democracy? The market may simply believe that the president of the United States has limited influence over the domestic economy, at least in the short term. Or perhaps investors believe that artificial intelligence conquers all.

But this interpretation overlooks the long-term consequences of possible policy decisions such as retreating from free trade (an area where Biden and Trump seem determined to outdo each other), urging the Federal Reserve to shift its focus away from inflation, and continuing on an unsustainable debt trajectory. When it comes to immigration, a top concern for voters, Trump’s restrictions would impede high-skilled immigration, while Biden’s open-border policy makes little sense.

Alternatively, perhaps investors understand that the U.S. electorate has become so deeply divided that no president is likely to control both houses of Congress for more than a couple of years. With political gridlock becoming the norm in Washington, the Big Tech firms accounting for a large share of the stock market’s recent gains, owing to an AI boom, are less likely to face anti-monopoly regulation.

To be sure, with Nvidia on track to rival Apple’s market capitalization, Biden has issued a sweeping executive order aimed at “managing the risks” posed by the rise of AI. But given the administration’s lackluster efforts to rein in the tech industry, it remains unclear how it intends to manage these risks. Federal Trade Commission Chair Lina Khan, one of the few people trying to revitalize U.S. antitrust policy, has been heavily scrutinized and criticized by the media, and her aggressive approach has produced mixed results.

Meanwhile, the Supreme Court could soon strike down or limit state laws in Texas and Florida that seek to prevent social-media companies from making certain editorial judgments about the posts shared on their platforms. While most justices seem wary of regulating online content, there is little doubt that unregulated social-media platforms and information echo chambers have exacerbated many of America’s problems, particularly political polarization and the mental-health crisis.

Given that the risks posed by AI far exceed those associated with social media, we must not repeat the same mistake. While these emerging technologies hold the promise of improving our legal, ethical, economic and political systems, they could just as easily disrupt them in the absence of regulatory oversight.

The evolution of financial regulation offers valuable insights into how to regulate AI without sacrificing innovation. Regulators, who tend to lag behind innovators, often struggle to balance efficiency and risk. Following the 2008 financial crisis, however, regulators managed to implement stringent measures that hampered market efficiency but also enabled banks to withstand the Covid-19 shock and subsequent inflationary pressures.

The current stock-market rally is partly fueled by the expectation that AI will remain unregulated, despite the potential displacement of tens of millions of workers, the threat of political instability, and the distortion of public discourse. The AI industry could eventually amass enough political power to quash any attempt to regulate it, mirroring the strategies used by banks before the global financial crisis and social-media platforms today. Essentially, the market is operating under the assumption that AI companies will thrive, regardless of the outcome of the U.S. presidential election.

But a Trump victory would be bad for everyone. A second Trump term could trigger an escalation in the Sino-American trade war or lead to a U.S. withdrawal from NATO and a subsequent military conflict. Neither scenario is expected to benefit the domestic economy in the long term. Trump’s planned 10% tariff on almost all imported goods, which could prompt America’s trading partners to impose tariffs of their own, would undoubtedly make things worse.

Moreover, Russia’s expansionist ambitions will not stop at Ukraine, and European countries will need years to shore up their military and technological capabilities, even if they manage to boost their defense spending to 2% of GDP this year. Allowing the world’s largest economy to be governed by Trump’s arbitrary and impulsive policies would weaken the institutions that underpin America’s economic strength.

Conversely, the consequences of a Biden victory would be far more predictable, especially if the Democrats hold on to the Senate and take back control of the House of Representatives. Regrettably, this would likely result in significantly higher interest rates that constrain private demand, coupled with subtle pressures on the Fed to take greater risks with inflation.

But given the challenges and uncertainties facing both the U.S. and global economies, it is difficult to see how the current stock-market boom can last, no matter who wins in November.

Kenneth Rogoff, Professor of Economics and Public Policy at Harvard University and recipient of the 2011 Deutsche Bank Prize in Financial Economics, was the chief economist of the International Monetary Fund from 2001 to 2003. He is co-author of This Time is Different: Eight Centuries of Financial Folly (Princeton University Press, 2011) and author of The Curse of Cash (Princeton University Press, 2016). ©Project Syndicate