First there was Brexit. Then Trump.

Is it time to start getting ready for Frexit?

Investors are preparing for the possibility -- if remote -- that France ditches the euro as its home currency and brings back the franc. There's also a chance -- even more remote -- that France might exit the European Union altogether.

It seems almost unthinkable that the second-biggest economy among euro-based countries would choose to depart, but the rise of nationalism among voters around the world has given traders cause to fear surprising election outcomes. The dynamic emerged last June when Britain voted to leave the EU and was underscored by U.S. President Donald Trump's November victory on pledges to "Make America Great Again."

France will hold its first round of presidential elections on April 23, and Marine Le Pen, a far-right candidate with the National Front party who has pledged to restore the national currency and push for a referendum on exiting the EU, is leading the polls. While most candidates say she's likely to lose in the second round of voting, an unexpected victory would roil global markets.

Risks could include a steep plunge in European bank securities, a selloff of U.S. stocks and corporate bonds and a steep drop in Treasury yields, as investors seek safety in U.S. government debt. France, which currently boasts a AA credit rating from Standard & Poor's, could default if Le Pen succeeds in her push to redenominate the government's euro-based debt into francs.

"People are concerned that what should happen according to script might not happen according to script," said Scott MacDonald, chief global economist for Smith's Research and Gradings in White Plains, N.Y.

Last year's script was anything but predictable, as voters in the U.K. and U.S. latched onto campaigns tied to anti-globalization sentiment.

Le Pen stands in that camp, with her planks of exiting the euro and ending automatic citizenship for people born in the country. And, in an echo of Trump's pronouncements, she would seek to improve relations with Russia.

The Frexit risk adds to a growing roster of international trouble spots for investors, from China's slowing economy to potential trade disputes with Japan and Mexico. There's also the risk of escalated military conflict; North Korea said Monday that it had successfully tested a nuclear-capable missile over the weekend.

According to MacDonald, Le Pen garnered 25% in a Feb. 10 poll of voters' first-round election preferences. Second with 21% was Emmanuel Macron, a former investment banker who's considered socially liberal but economically pragmatic. Francois Fillon of the Republicans party, who has espoused a fiscally conservative approach, was an early favorite but has slipped to just 20% in the poll due to the fallout from revelations that he paid his wife hundreds of thousands of euros as his supposed parliamentary assistant.

Benoit Hamon, the candidate for sitting French President Francois Hollande's Socialist Party, is polling 16%; he has pledged to legalize marijuana and tax the use of robots.

So the Frexit warnings are beginning to trickle out.

Bank of America analysts wrote in a report last week that a French exit from the euro could have "far-reaching systemic implications for the global financial system." Moody's Investor Service said Feb. 3 that "financial markets do not appear to be pricing in acute fragmentation risks, suggesting that the impact of any such shock could be severe."

If France insisted on repaying its euro-denominated debt in francs, the country would be declared in default, Moritz Kraemer, S&P's head of sovereign ratings, wrote in a letter published in The Economist earlier this month, according to Reuters.

Markets have already started to price in a higher risk of deterioration in France's credit standing. The yield on 10-year French government bonds has climbed to 1.04%, from 0.69% at the start of the year. It's now 0.74 percentage point over yields on comparable German bonds -- the highest gap in four years.

A Le Pen victory could bring a stock-market rout for large U.S. banks, MacDonald said, given their exposure to France and the rest of the European Union; firms such as JPMorgan Chase (JPM) - Get Report , Citigroup (C) - Get Report and Goldman Sachs (GS) - Get Report already are grappling with whether and how to relocate their London-based trading hubs following the Brexit vote.

"If there is turmoil in markets because of the French elections, it'll come through U.S. banks," MacDonald said. "We're talking big banks. They're international, and they have exposure around the planet."

For example, in its most-recent annual report, JPMorgan, the biggest U.S. bank, listed $26.2 billion of lending, trading and investing exposures to France -- the third-most after the U.K. ($46.7 billion) and Germany ($30.7 billion.)

French, German and Swiss banks would obviously also come under severe pressure, MacDonald said.

The smartest and easiest thing right now for investors worried about Frexit would be to reduce exposure to peripheral European countries such as Italy, Spain, Portugal and Greece, he said.

MacDonald estimates that Le Pen has, at most, a 35% chance of victory in the second round of elections. A terror attack in France before the elections could sway the vote in her favor. If elected, she'd likely face resistance to a euro exit from within the French parliament, he said.

"There's a long way between here and there," he said. "But people have looked out here at the political scenario, and if it's like the U.S., we'll end up with a 'neofascist' sitting in the Elysee Palace."

EXCLUSIVE LOOK INSIDE: Citigroup is a holding in Jim Cramer's Action Alerts PLUS charitable trust portfolio. Want to be alerted before Cramer and the AAP team buy or sell the stock? Learn more now.