– The bull market in U.S. stocks is about to become the longest in history.

If stocks don’t drop significantly by the close of trading Wednesday, the bull market that began in March 2009 will have lasted nine years, five months and 13 days, a record that few would have predicted when the market struggled to find its footing after a 50 percent plunge during the financial crisis.

The long rally has added trillions of dollars to household wealth, helping the overall economy, and stands as a testament to the ability of large U.S. companies to squeeze out profits in tough times and confidence among investors as they shrugged off repeated crises and kept buying.

“There was no manic trading, there was no panic buying or selling,” said Jack Ablin, chief investment officer of Cresset Wealth Advisors. “It’s been pretty steady.”

The question now is when the rally will end. The Federal Reserve is undoing many of the stimulative measures that supported the market, including keeping interest rates near zero. There also are mounting threats to global trade that have unsettled investors.

For such an enduring bull market, it shares little of the hallmarks of prior rallies.

Unlike earlier rallies, individual investors have largely sat out after getting burned by two crashes in less than a decade. Trading has been lackluster, with few shares exchanging hands each day. Private companies have shown little enthusiasm, too, with fewer selling stock in initial public offerings than in previous bull runs.

Yet this bull market has been remarkably resilient. After several blows that might have killed off a less robust rally — fears of a eurozone collapse, plunging oil prices, a U.S. credit downgrade, President Donald Trump’s trade fights — investors soon returned to buying, avoiding a 20 percent drop in stocks that by common definition marks the end of bull markets.

“I don’t think anyone could have predicted the length and strength of this bull market,” said David Lebovitz, a global market strategist at JPMorgan Asset Management.

Since the rally officially began on March 9, 2009, the Standard & Poor’s 500 has risen 321 percent. In the 1990s bull market, the current record holder for the longest, stocks rose 417 percent.

From the start, the Federal Reserve was a big force pushing markets higher. It slashed short-term borrowing rates to zero, then began buying trillions of dollars of bonds to push longer-term rates down, too. Investors frustrated with tiny interest payments on bonds felt they had no alternative but to pile into stocks.

Companies moved fast to adapt to the post-financial-crisis world of sluggish U.S. growth.

They slashed costs and kept wage growth low, squeezing profits out of barely growing sales. They bought back huge amounts of their own stock and expanded their sales overseas, particularly to China’s booming economy. Profit margins reached record levels, as wages sunk to record lows as measured against the size of economy.

“What people missed was how quickly U.S. corporations were restructuring and right-sizing themselves to regain profitability,” said money manager James Abate, who publicly urged investors to start buying stocks in early 2009 when most were dumping them. “It was really a catalyst for turning things around.”

Several dangers threaten the rally.

The Fed has hiked its benchmark lending rate twice since January and is expected raise it twice more by the end of the year.

Stocks could suffer as higher interest on bonds lures investors to start shifting money into this safer alternative. Higher rates also increase costs for business and make expanding operations more difficult.

More worrisome, rising rates can trigger recessions, which often kill bull markets. Three of the past five recessions were preceded by rate hikes by the Federal Reserve.

But with stocks richly priced, there isn’t much room for things to go wrong.

The prices investors are paying per share for companies are 2.2 times revenue per share, near historic peaks.

For all its longevity and gains, the final verdict on the bull market won’t be known until it ends.

Abate says stock prices are too high given the threat to profits from higher borrowing costs as rates climb, higher input costs from Trump’s tariffs and, possibly, bigger raises for workers in the future.

“Profits are peaking and valuations are extreme,” said Abate, chief investment officer of Centre Asset Management. His prediction is that stocks will plunge by the end of the year and a bear market will begin.

Others are more optimistic.

JPMorgan’s Lebovitz takes comfort in the fact investors have been skeptical of the rally all along, which he says has allowed none of the excesses of prior bull markets to build up. “This is a bull market that people love to hate,” he said.

Asked how much longer the rally will last, he said: “At least another year, but two might be a bit of a stretch.”