As Donald Trump faces the toughest political test of his presidency, he essentially has two options: Dig in and fight, or walk away before he faces an almost certain impeachment in the House of Representatives.

Trump’s instincts, of course, are to fight, and he’s given no indication so far that he’s about to back down as the Democratic leadership builds its case. The impeachment forces are banking that they can prove Trump made a quid pro quo deal with Ukrainian leaders to withhold aid in exchange for an investigation into Hunter Biden, son of Democratic presidential front-runner Joe Biden.

Despite the unlikelihood that Trump would shrink from the battle, one Wall Street firm has put together a what-if case should he decide to resign before being impeached.

“While we acknowledge this is a low probability event, the question we are hearing more often in DC is: What if President Trump decides to walk away from the presidency and voluntarily resigns prior to being impeached and/or having to release his tax returns?” wrote Chris Meekins and Ed Mills, policy research analysts at Raymond James.

Market impact likely would be minimal, according to the analysis, which sees the emergence of Vice President Mike Pence as the GOP standard-bearer providing stability for Wall Street and the economy.

The White House declined comment on the analysis. Trump has been aggressive in his own defense, tweeting Thursday morning that the impeachment inquiry is “The Greatest Witch Hunt in American History!”

Nevertheless, should his approach change and he decides to step down, “Trump would not go down in history as one of the only impeached presidents,” the Raymond James analysts added. “His tax returns, which he does not want to give to become public while President ... kind of become a non-issue. Trump can go make even more money and maybe start his own media network, which reportedly was the initial plan.”

In the scenario, Raymond James imagines Trump using this line of reasoning to further justify walking away:

I have done everything I set out to do as President. America is great again. We have record low unemployment, the market is doing amazing, we have exited endless foreign wars, and I’ve stopped other countries like China from taking advantage of us in trade deals. We passed massive tax cuts and drug prices are down for the first time ever. I’m not one of these lifetime politicians. I’m ready to return to my business and spend more time with my family. This harassment of me by Democrats has really hurt Melania and my kids.

A Trump resignation would mean Pence immediately would assume the Oval Office.

In that case, the analysis figures Pence would tap Nikki Haley, the popular former United Nations ambassador and South Carolina governor, as his running mate.

A market rally?

Despite the constant swirl of controversy around the Trump administration, Pence has remained relatively under the radar. YouGov polling puts his positives and negatives about even — 37% to 40%, respectively — while 15% report having a neutral opinion.

The market likely would show confidence in a President Pence, Meekins and Mills said.

“After the initial shock, we think the market rallies as Pence is a predictable, traditional, conservative choice,” they wrote. “Pharmaceuticals, names related to China trade, defense names all likely rally if there is a belief that it hurts the Democrats’ chances at winning or shores up support for a Republican Senate.”

Americans as a whole remain split about Trump leaving office. The latest impeachment tracker on FiveThirtyEight shows 49.2% in favor and 44.3% against. Read more at CNBC