If you've been watching the stock market's 2023 rally so far and had a drop of regret, trust me when I say that you're not alone. Seeing major indexes up double-digit percentages and some growth stocks doubling in value can make any investor wish they'd had the foresight to invest more heavily during the bear market and at the start of the year.

Don't fret, though. It's not a missed opportunity -- just the cyclical nature of the stock market. There are bear markets, bull markets, booms, busts, corrections, and the whole nine yards. Since the stock market's been around, periods of decline are typically followed by periods of growth, and vice versa. Luckily, the growth tends to offset the decline.

It's about playing the long game

There's an old proverb: "The best time to plant a tree was 20 years ago. The second best time is now." This same thought process can be applied to investing and reinforces the importance of playing the long game. Investors are generally better off focusing on consistency and longevity rather than chasing trends, trying to buy low and sell high, or sell high and rebuy low. 

"Time in the market is better than timing the market" is investing wisdom that's maintained its relevance for a reason. For perspective, let's imagine someone invested $10,000 in the S&P 500 on Dec. 31, 2007, and didn't touch it until exactly 15 years later. At that point, the investment would've been worth over $35,400.

Here's how the $10,000 investment would look depending on how many of the S&P 500's best days you missed over those 15 years.

Number of Best Days Missed Annualized Total Return Value of $10,000 Investment
0 8.81% $35,461
10 3.29% $16,246
20 (0.17%) $9,748
30 (2.93%) $6,399
40 (5.32%) $4,401

Data source: Putnam Investments / Best days defined as largest single-day gains.

Even missing 20 of the best days -- out of around 3,750 trading days over that span -- was enough to cause you to actually lose money. Simply missing 10 of the best days was enough to drop the investment value by close to $20,000.

A decades-old tale that remains true

Since the stock market's beginning, the difficulties (and often counter-productivity) of trying to time the market have remained consistent. Here's how S&P 500 returns would look each decade if you missed the best 10 days in each span:

Decade Price Return Price Return Excl. 10 Best Days
1930 (42%) (79%)
1940 35% (14%)
1950 257% 167%
1960 54% 14%
1970 17% (20%)
1980 227% 108%
1990 316% 186%
2000 (24%) (62%)
2010 190% 95%

Source: Bank of America.

To be fair, you could argue that there's a chance you'll miss out on some of the market's worst days, too, which could help performance, but that goes back to the idea of trying to time the market. It's best to avoid it from both sides.

It's all about consistency

Once you fully understand the cyclical nature of the stock market, you learn to keep your eyes on the long-term prize and focus on consistency. Small, consistent investments over a long period can work wonders. Even more so than larger investments over a shorter period a lot of time.

A good way to remain consistent is using a strategy like dollar-cost averaging. When you dollar-cost average, you decide how much you can invest (typically monthly) and then put yourself on a set investing schedule. You can decide on weekly, bi-weekly, or whatever works for you. The key is to make your investments regardless of stock prices at the time.

You'll inevitably buy some stocks when they're overvalued, but the opposite is also true. You just have to trust that it'll even out over time. Maybe more important in the grand scheme is that it keeps you consistent and removes the urge to want to time the market because your schedule is set.

You may have "missed" this opportunity, but the stock market has a way to reward investors that practice patience and discipline.