It’s a wild ride, but just hang on.

Investors can survive and eventually prosper despite the horrific pandemic-driven stock market gyrations we are experiencing, investment professionals say.

“Don’t panic. Never in my near-40-year career have I once heard someone say, ‘Gee, I’m glad I panicked,’ ” said Richard Bernstein, a longtime financial adviser with his own firm in Manhattan.

Another pro recommends inertia. “One of the smartest things you can do now is to do nothing,” said Kashif A. Ahmed, who has his own advisory firm in Bedford, Mass. If you have a good plan, stick to it, he added, contending that bad times could result in good ones.

“If you have funds, perhaps you may not find a great buying opportunity like this for many years,” Ahmed said. “You may have learned that lesson in 2009, but don’t forget it.”

Pros note that in 2008, when the housing bubble exploded and the stock market lost 37 percent, many panicked and dumped stocks — which ruined long-term plans, because the market was up 26 percent in 2009.

Still, ignoring blood on the Street is difficult. In March, some $15 trillion in market value was wiped out globally, and $8.3 trillion in the US alone since the Feb. 19 market peak, according to S&P Global.

Rose Swanger, an adviser in Knoxville, Tenn., said “the worst thing an investor can do is sell — then one really turns a paper loss into a real loss.”

Losses, said Ben Carlson, a chartered financial analyst with Ritholtz Wealth Management, can be lessened by those who put money in both stocks and bonds — say a 70/30 or 80/20 split. It can work even though one loses money in the short term.

“The waterfall of losses has been brutal, but everything 70/30 and down has held up reasonably well. Even an 80/20 portfolio is down just 15 percent,” Carlson said. “It feels like the world is ending at the moment, but these are not end-of-the-world-like returns.”

Using dollar cost averaging — which means buying stocks and funds regularly, no matter what — lessens risk, added Francis Gannon, co-chief investment officer with Royce Investment Partners. His firm’s market view remains unchanged.

“Our long-term outlook is decidedly optimistic,” Gannon said.

Another adviser thinks the recent crash could actually be good for many long-term investors.

“If people are saving and adding to portfolios, use this as an opportunity to make your annual IRA/Roth contributions. Buy while the market is down,” said Brian Behl, a financial planner in Waukesha, Wisc.

That’s a logical approach, added another adviser — but not so easy to apply.

“Being rational and unemotional can be difficult when it comes to managing money while being inundated by the terrifying headline news and thousand-point daily market gyrations,” said Jon Ulin, in Boca Raton, Fla.

“In a perfect world,” Ulin added, “every investor would buy low and sell high.” However, “the realities of markets and behavior often prove more complex, and require a more measured approach.”

Adviser Sandra Adams of the Center for Financial Planning in Southfield, Mich., recommends to have a plan — and funds in reserve.

“In the short term, liquidity is key,” Adams said.

“Keeping a healthy savings/emergency reserve — as much as 12 to 24 months in cash is a good idea,” she counseled. “Cutting back on non-essential spending could be a good idea, especially for those whose income sources may be wavering or are not guaranteed.”

Markets recover, Bernstein said.

“Someone who invested right at the 2007 market peak, and experienced the worst bear market in the post-World War II era, would have recouped their investment in less than five years if they had stayed invested,” he observed.