(Bloomberg Opinion) -- There are only a few basic rules of investing: diversify, keep your costs low and probably most important, hang on when markets tumble occasionally. The last one is the trickiest. It’s not easy watching money vanish as the market plunges, particularly when many people, some of them highly respected, are carping about the end of the world, which invariably accompanies a market collapse.So it was when Covid-19 sent U.S. stocks into a tailspin in late February. The S&P 500 Index shed a third of its value in just more than four weeks, one of the steepest retreats on record, amid widespread chatter that the pandemic would plunge the U.S. into a long depression, wiping out whole industries and permanently damaging broad swaths of the economy.Hanging on to stocks through that chaos was no small feat, and amazingly, most investors managed to do it. Research firm Dalbar, which attempts to track investors’ moves into and out of mutual funds, concluded in a recent report that “the average investor’s appetite for equities has remained unchanged throughout the Covid crisis.” Vanguard Group, which oversees more than $6 trillion in assets, found that less than 0.5% of its retail clients and self-directed investors in its retirement plans panicked and moved to all cash between Feb.19, the market’s pre-coronavirus peak, and May 31.That’s a big change from previous meltdowns, most recently the 2008 financial crisis, when investors dumped stocks in droves. It seems to have finally sunk in that all crises pass and that the stock market eventually recovers, no matter how desperate things seem at the time. And true to form, the market recovered sooner than anyone expected. It shot higher in late March and surpassed its pre-Covid high in August, even as the coronavirus showed few signs of slowing. As it turned out, the recovery began roughly eight months before news arrived that a highly effective vaccine is in hand and will start to be distributed soon. That sounds about right. Those who dumped their stocks along the way, gambling that the market is poised for a long slump and would give them an opening to reenter at even lower prices, now face a hard choice. The market is up roughly 60% from its March low, so getting back in means coming to terms with a costly mistake. Say you had $100,000 in the market at the pre-coronavirus peak and sold roughly halfway down, recovering about $83,000. If you had stayed in the market, you would have roughly $107,000 today, or close to 30% more money than when you exited. That’s tough to swallow.But the alternative is worse. The temptation is to wait stubbornly for the market to revisit its lows, a day that may never come. During the financial crisis, the market turned sharply higher in March 2009, even though it was not yet evident that a collapse of the financial system would be averted. When the all-clear came several months later, the market had risen roughly 60% through October.Sound familiar? Investors who dumped their stocks during the financial crisis faced the same choice modern-day deserters do now. Those who jumped back in after the crisis eased in 2009 have more than tripled their money despite buying back at what must have seemed like an outrageous price at the time, while those who waited for the elusive ideal reentry are still waiting. There are countless other examples. With rare exception, when the market surges from the depths of a crisis, it’s a signal that it has moved on, even if some investors have not. Chances are, the market has moved on from Covid-19, and investors should, too. The next time — and yes, there will be a next time — investors are tempted to dump their stocks during a crisis, they should focus not on getting out but getting back in. That should clarify the wisdom of staying put. No one can anticipate the bottom in advance, which means that the reentry will either be too early or too late. And too early is unrealistic. If you’re tempted to run for the exit when the market is down 20%, you probably won’t be in the mood to buy when it’s down 30% or more. That leaves one alternative: buying late, which is the pickle some investors are in now. It’s best to avoid that quandary altogether by remaining invested.For now, those who got out should recognize that there will never be a better time to get back in, at least one that can be known in advance.This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.Nir Kaissar is a Bloomberg Opinion columnist covering the markets. He is the founder of Unison Advisors, an asset management firm. He has worked as a lawyer at Sullivan & Cromwell and a consultant at Ernst & Young. For more articles like this, please visit us at bloomberg.com/opinionSubscribe now to stay ahead with the most trusted business news source.©2020 Bloomberg L.P.