FILE - In this Nov. 27, 2009 file photo, traders move about the floor of the New York Stock Exchange in New York shortly before the opening bell. If stocks don’t drop significantly by the close of trading Wednesday, Aug. 22, 2018, 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. (AP Photo/Peter Morgan, File)

FILE - In this Nov. 27, 2009 file photo, traders move about the floor of the New York Stock Exchange in New York shortly before the opening bell. If stocks don’t drop significantly by the close of trading Wednesday, Aug. 22, 2018, 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. (AP Photo/Peter Morgan, File)

NEW YORK (AP) — 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 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.

ADVERTISEMENT

“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 are also 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.

One of the market’s biggest winners in recent years, Facebook, wasn’t even publicly traded when the bull market began. Facebook’s huge run-up of more than 350 percent since going public in 2012, Apple’s steady march to $1 trillion in value, and huge gains by other tech companies like Netflix have helped push the broader market higher.

Since the rally officially began on March 9, 2009, the Standard and 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.”

China’s surging growth helped the market, too. Its boom drove up the price of oil and other commodities, helping to lift stocks of U.S. natural resource companies — for a while at least.

Then came a downgrade of the U.S. credit rating in August 2011, which caused stocks to swoon, and 2013 brought another fall as Fed Chairman Ben Bernanke talked of easing off stimulus policies. In the second half 2014, oil plunged 50 percent, which rattled investors again.

Profits started falling the next year, but investors kept their nerve and didn’t sell and waited for profits to rise again. In 2016, stocks gained 10 percent then jumped 19 percent the next year. Since the start of 2018, they have risen 6.6 percent, boosted by surging profits following the massive cut in corporate tax rates earlier this year.

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 convinces 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.

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. And prices compared to long-term earnings are much higher than in 2007 before the market crashed.

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

The financial crisis of 2008 that ended the last bull market laid bare just how much debt and risk-taking had fueled gains in the previous seven years. The dot-com bust that ended the 90s rally showed how reckless investors had been.

This time, many of the unanswered questions concern the Fed’s monetary stimulus.

How much did it help boost stocks, and thus the broader economy? Will the gains it helped manufacture prove ephemeral? What are the long-term costs of its unprecedented economic rescue effort as it faces the tricky task of unwinding its stimulus program?

Another question is the wisdom of so many buybacks. Companies have spent trillions in recent years repurchasing their own stock, which has helped lift prices in the short term but does nothing to expand operations, train workers and generally improve their business. Many of the purchases were made with borrowed money, adding to already sizable debts.

Abate, the money manager who urged people to buy early in 2009, 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. “Blind exuberance hasn’t been a characteristic.”

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