If Donald Trump is lucky, he may never be faced with a market crash as gruesome as the one that welcomed President Barack Obama when he first took office in 2009.

Stocks, which already had plunged in 2008 in the wake of the financial crisis, continued to collapse in the first few weeks after Obama was inaugurated. The Dow plummeted 20% from mid-January to early March 2009.

But as anyone who follows stocks closely knows, the market bottomed in March 2009 and has been off to the races ever since.

With that in mind, it may be tough for stocks to enjoy nearly as explosive a rally under Trump in the next four (or eight) years as it has during Obama's tenure.

The Dow has gone up more than 140% since Obama's inauguration in January 2009.

If you look at how the Dow has done since it hit its low point on March 6, 2009, it's up 210%.

If the Dow goes up 140% during the next eight years (yes, I am going to hypothetically assume that Trump winds up a two-term president for the purposes of this story) then it would be trading around 47,800.

And if it goes up 210%? The Dow would be at about 61,500.

61,500. That seems unimaginable, doesn't it? Heck, 47,800 seems (say like Wallace Shawn in "The Princess Bride") inconceivable!

But how did the Dow go from just around 6,450 at its low point eight years ago to the precipice of 20,000 today? Obama does deserve some, albeit not all, of the credit.

The $787 billion economic stimulus package approved by Congress just a month after Obama became president helped get the economy (and market) back on track.

However, the bank bailout (love it or hate it) that was put into place during the last few months of the George W. Bush administration also is largely responsible for stabilizing large banks, one of the primary culprits of the 2008 collapse.

Dow components JPMorgan Chase (JPM) and Goldman Sachs (GS) have skyrocketed since the bailout and are not far from their record highs.

Emergency programs put into place by the Federal Reserve in 2008 and early 2009 -- and the maintaining of historically low interest rates throughout Obama's tenure -- also played a role in stabilizing the markets.

The dramatic rise of several big technology stocks in the past eight years has also helped propel the market higher. That may have little to do with Obama.

Apple's (AAPL) shares have surged more than 415% since he took office. Amazon's (AMZN) are up an astonishing 900%.

And Facebook (FB), which went public during the last few months of Obama's first term in 2012, is up 230% from its offering price.

Does Obama deserve credit for the genius of the late Steve Jobs, Jeff Bezos and Mark Zuckerberg? Not really.

All this goes to show that a President is partly (but not entirely) responsible for how well stocks do during their term. It's also worth noting that the market is not the same thing as the economy.

The market may have set records over the past eight years, but the pace of the economic recovery remains frustratingly slow for many Americans -- and that helped fuel Trump's victory over Hillary Clinton.

But if earnings keep humming along under Trump and economic growth picks up thanks to plans to boost infrastructure spending and other stimulus, then maybe the Dow will be above 45,000 (or even 60,000) by the time he's leaving the White House.

After all, consider that the Dow went up more than 130% during Ronald Reagan's two terms.

And it rose more than 225% during Bill Clinton's eight years in office.

Economic growth was higher during the Reagan and Clinton years than it has been under Obama.

Of course, there is another recent two-term president that didn't enjoy a big rally.

Stocks plunged under George W. Bush -- in large part due to the aftermath of the 9/11 attacks and the Great Recession.

But if GDP growth accelerates under Trump, then the market could wind up climbing, just as it did for many of his predecessors.

A stronger economy should be good news for construction giant (and Dow component) Caterpillar (CAT) -- which has already popped on stimulus hopes.

It would also benefit many other cyclical Dow companies like retailers Walmart (WMT) and Home Depot (HD) and other brand name consumer firms such as Coca-Cola (KO) and Disney (DIS).

So scoff if you want at the notion that the Dow could hit gaudy targets like 45,000 or 60,000 within the next few years.

But just remember that it seemed equally laughable for the Dow to pass round number milestones like 2,000, 10,000 and 15,000 under Reagan, Clinton and Obama.

Yet they did.