The S&P 500 has climbed more than 20% from its bear market low back in October. And some are calling this the start of a new bull market. The recent gains are great -- and definitely a reason to get excited about investing.

But we may not technically be in a bull market yet. That's because a bull market is characterized by, as mentioned, a 20% gain from bear market lows -- but also a second factor. An index must reach a new record high. And that hasn't happened. But a bull market is on the way, and it might even be right around the corner. Here's what to do next.

What history shows us

First, why am I so sure a bull market is on the way? History shows us that bear markets always lead to bull markets. In fact, the average bear market generally lasts about a year. So these times of down markets are temporary and lead to better days.

It's impossible to say for sure when a new bull market will start. But considering the S&P 500 already has met the first criteria, a bull market could be right around the corner. There's reason to be optimistic.

As for what to do next, here's where I might surprise you. You can do something right now that will serve you well whether the bull market arrives tomorrow or a year from now. You can invest. But I'm not talking about just any sort of investing. I'm talking about long-term investing.

The idea is to buy stocks today that you can hold on to for at least five years. This gives the company the time it needs to grow earnings and, in some cases, deliver dividends. And it gives you time to benefit from all of that.

The great thing about long-term investing is that you can do it in any market environment. In a bear market, you can find bargain-basement prices on top-quality companies. But you also can do this in a bull market. Just because the overall market may be rising doesn't mean every stock is expensive.

Bull markets also offer you the opportunity to discover up-and-coming growth stocks as they gain momentum -- or rediscover well-established companies that may experience a fresh wave of growth.

Investing flexibility

Long-term investing offers you amazing flexibility. And this is especially useful in a market like the current one. It doesn't exactly feel like a bear market these days. After all, a lot of top growth stocks, like Amazon and Tesla, are soaring again.

But we can't call it a bull market either. And we know that a recession may be on the horizon. The Federal Reserve has forecast a mild one later this year.

Considering all this, your next move shouldn't be to invest only in stocks that will excel in a bull market or stocks that ensure safety in a bear market. Instead, focus on the long term and buy stocks that will help you meet your goals over the long haul.

For instance, if you like passive income, now is a good time to consider a stock like Dividend King Johnson & Johnson. If you're an aggressive investor seeking growth, you might go for Moderna. The company has set out impressive goals for revenue growth by 2027, thanks to its respiratory vaccine program.

And both of these stocks are reasonably priced today. J&J trades for about 15 times forward earnings estimates, down from about 18 times a year ago. And Moderna trades for 8 times forward earnings estimates -- a deal if you look at the biotech's candidates in the pipeline and those revenue goals I just mentioned. And these are just two examples. Plenty exist across industries.

So right now, it actually doesn't matter whether we're in a bear market or a bull market -- or something in between. The most important thing is to continue investing in quality companies and hold on for the long term. Generally, wealth isn't built overnight -- but rather over the long haul.