U.S. large-cap stocks are on the verge of something historic: Absent a 20 percent decline in the S&P 500 during Wednesday's trading, by most measures the current bull market is set to become the longest on record by eclipsing the 1990-2000 dot-com uptrend.

The current bull market is now 3,452 days old. One additional day would take it over the threshold into the history books. This comes after the S&P notched a new record high on Tuesday, thanks to solid corporate earnings reports and optimism about a resolution to the U.S.-China trade spat ahead of official negotiations scheduled for next week.

For sure, the U.S. economy and the stock market have come a long way from the harrowing days of March 2009 when the financial system was teetering on the edge, President Barack Obama was just two months into the job and the S&P 500 hit an intraday low of 666. On Tuesday, it closed at 2,862 for a gain of nearly 330 percent since that nadir.

Get Breaking News Delivered to Your Inbox

How did we get here? Here are the three main factors:

The Federal Reserve

The single largest force that has boosted share prices has been the epic post-financial crisis experiment in cheap money stimulus. I remember vividly in late 2008 when former Federal Reserve Chairman Ben Bernanke cut interest rates to just above zero. Plus, he announced the central bank would purchase up to $600 billion in mortgage bonds to help stem the housing bubble collapse. In March 2009, that program was expanded by more than $1 trillion as the Fed added Treasury bonds to the purchasable assets.

Multiple iterations of "quantitative easing" followed and helped swell the Fed's balance sheet -- or value of assets it owned -- by nearly $4 trillion. While the bond-buying stopped in early 2015 and the Fed starting raising interest rates in December 2015, for a total increase of roughly 1.9 percentage points to date, cheap cash continues to slosh around the financial system -- and it's finding its way into financial assets of all types.

Share buybacks, dividends and earnings growth

With the Fed holding interest rates so low while pumping so much cash into the economy, many corporate managers have shied away from riskier revenue-growing efforts like mergers and acquisitions or investments in new hiring or expansion. Instead, the focus has been on share buybacks: using net income and debt-fueled borrowing to buy back their own shares. Higher dividends have also been a part of this.

Share buybacks and dividend payouts both heighten the attractiveness of stocks relative to alternatives like bonds or bank deposits. Higher dividends increase the income investors can earn from equities. And buybacks reduce the number of shares outstanding, thereby boosting earnings-per-share metrics while also lowering valuations multiples such as the price-earnings ratio. Public companies have been the single largest source of buying demand during this bull market, far outpacing purchases by households (chart above).

As for earnings, S&P 500 companies are enjoying profit growth of more than 20 percent on a year-over-year basis, putting the unpleasantness of the 2014-2016 oil price crunch behind them.

Fiscal largesse

The last really frightening setback the market has been forced to suffer was the 2011 decline related to the downgrade of the U.S. Treasury's credit rating by S&P Global Ratings amid a budget showdown between Tea Party Republicans and President Obama. Fights over the debt ceiling followed, making investors deal with government shutdowns and the 2013 fiscal cliff.

But now, the GOP seems to have forgotten all about fiscal discipline under President Donald Trump with the recently passed tax cut and military spending increase leaving a large, smoldering budget crater. The national debt now totals $21.4 trillion, or more than $65,000 for every man, woman and child. The annual deficit is running at more than $780 billion.

But all that fiscal stimulus has poured gasoline on an already mature economic expansion, boosting GDP growth and corporate profits and helping lift the stock market out of the 2014-2016 funk. Indeed, the powerful and steady uptrend equities enjoyed in 2017 was due in large part to investors pricing in Mr. Trump's tax cut.

Now, the Atlanta Fed is looking for third-quarter GDP growth to total 4.3 percent. An impressive figure that would be sure to add further life to this record bull run.