I very rarely buy stocks. I prefer index funds and exchange-traded funds (ETFs) for their ease and simplicity. But when the S&P 500 dropped 31% in March 2020 from its beginning-of-the-year highs because of the pandemic, I saw a unique opportunity.

Securities were trading at their lowest prices in years, and I was one of the lucky individuals who still had money earmarked for investing. I couldn't resist swooping in and buying some companies that I thought would do well.

Blue stock market ticker.

Image Source: Getty Images

What I bought 

Companies like Sorrento Therapeutics (SRNE.Q 5.84%) and Walmart (WMT 0.13%) have met demands created by the pandemic and could have a lot of growth potential. Sorrento had a robust portfolio of coronavirus innovations ranging from tests to treatments. And with most people's purchases reduced to essentials, Walmart was a major retailer that could supply their needs. 

I kept the core part of my investment portfolio invested in mutual funds and ETFs but allocated a percentage of it for these stocks. These were short-term purchases, and eventually when I reached a profit margin that I was happy with, I would sell them and buy the SPDR S&P 500 ETF Trust. (SPY 0.35%)

My big mistake

After the stocks reached the price target that I had set, I sold them. But I then made a big mistake: I waited for another correction before reinvesting my proceeds.

Everything I read about the financial markets indicated that a correction was coming. The stock market was at an all-time high and seemed disconnected from what was happening in the economy. Various indicators like the Shiller price-to-earnings ratio pointed toward a reckoning that could last a long time.

I waited for days, and nothing happened. Those days turned into weeks and eventually months. Before I knew it, almost half a year had gone by and I still had cash sitting on the sidelines but no significant buying opportunity like in March 2020. The longer I waited, the more fearful I became. Now I was sure that I'd missed my opportunity, and that as soon as I invested my cash, the markets would crash -- until I did these simple calculations. 

I wondered what would've happened if I had put a lump sum into the S&P 500 at the beginning of the last two big stock market crashes. How much would I have today?

If I had invested $25,000 into the S&P 500 at the beginning of 2000 before the dot-com crash, I'd have $99,873 today. Almost quadruple my initial investment despite five years of negative returns: -9% in 2000, -11% in 2001, -22 in 2002, -37% in 2008, and -4% in 2018. If I had invested that same amount at the beginning of 2008, I'd have $87,559 today. 

Lessons learned 

Meanwhile, because of my inaction, I missed out on 12.7% gains since taking my profits. I immediately corrected this mishap by investing all of my cash. I couldn't get the gains I'd missed out on, but I could prevent any further lost opportunities.

No one really knows when a pullback could happen. If your money is for retirement or some other long-term goal and you don't anticipate using it for years, time in the market is most important. If history repeats itself (which it always has), in between now and when you will need your money at least one or two market crashes could happen. Avoiding one altogether will be impossible. And even when bear markets have happened, they have always been temporary.

Keeping your money invested in good times and bad will ensure that you don't miss out on market rallies while trying to avoid crashes.