This year has been one for the record books. After hitting a new all-time high in February, the S&P 500 (^GSPC -0.29%) promptly reversed course, tumbling 19%. Fears about the impact of tariffs and their potential to reignite inflation were pervasive. However, since those dark days in early April, the market has rebounded, hitting 10 record highs in July and gaining 29% over the past four months.

During that time, the market closed above a key metric for 68 consecutive days. A streak of that magnitude has occurred just eight times before. The data shows that on almost every previous occasion, the benchmark index continued to climb during the coming 12 months, generating additional double-digit returns.

Let's review the data and see what it says about the coming year.

A person looking at the tickers for a stock market exchange.

Image source: Getty Images.

History suggests the S&P 500 will continue to climb over the next 12 months

A brief primer might be in order to provide a suitable backdrop. The 20-day moving average is a widely used technical indicator that helps traders track the market's underlying short-term momentum. This measure is calculated by averaging the closing price of the market (or a given security) during the 20 previous trading days. This helps smooth out price fluctuations and helps to expose underlying trends. While this tool isn't typically used by long-term investors, it can provide valuable insight.

To recap, the S&P 500 recently closed above its 20-day moving average for 68 consecutive days. This marks just the ninth 60-plus-day streak since the benchmark index debuted in 1957, according to Ryan Detrick, chief market strategist at financial services company Carson Group. His research shows that in the 12 months following these previous occurrences, the S&P has risen seven out of eight times, notching additional gains of 11%, on average.

This chart shows the years in which the S&P 500 managed a 60-plus-day streak and the returns of the index in the succeeding 12 months:

Year of 60+ Days Above 20-Day Moving Average

S&P 500 12-Month Change

1961

4%

1964

11%

1965

-12%

1971

9%

1975

21%

1986

18

1997

15%

1998

21%

Average

11%

Data source: Carson Group. Chart by author.

As the chart illustrates, the S&P 500 delivered returns of 11% on average during the 12 months following a period when the benchmark closed above its 20-day moving average for 60 consecutive days (or longer). For context, the benchmark index has returned 8% annually, on average, since its inception in 1957. This shows that the market performed well above average following these streaks.

That said, investors would do well to remember the Wall Street proverb, "Past performance is no guarantee of future results." There's always the exception that proves the rule. However, understanding the data can help investors make informed decisions based on historical context.

The fly in the ointment

Given the historic volatility investors have experienced so far this year and the elevated uncertainty that remains, it's easy to understand why investors might have difficulty believing the market can achieve additional double-digit gains over the coming 12 months. After all, the ongoing tariff negotiations are far from settled, and the battle to rein in inflation continues. Furthermore, there's contradictory evidence, at least thus far, about the impact of tariffs on the broader economy.

The continuing market volatility and uncertainty regarding tariffs have some investors wary about what the future might hold, but those investing with a five-to-10-year time horizon generally have a different mindset.

The fine print

The evidence suggests the market will continue its winning ways over the coming year, but there are no guarantees. Furthermore, even if those increases do come to pass, investors shouldn't forget the lessons learned earlier this year -- the benchmark averages can and do plunge on the way to achieving new heights.

While historical data suggests the market will rise by double digits over the next 12 months, it could experience setbacks several times on the path to future gains. In fact, I'm fairly confident in suggesting that the volatility that has been prevalent so far this year will likely continue.

Having a set investing schedule and adding to your portfolio at regular intervals takes much of the guesswork out of the process and offers the best path to prosperity. It also helps instill the discipline necessary to succeed over the long term, regardless of the market's short-term movements.

History is clear: The stock market has generated average returns of 10% annually going back 50 years. That's why having a long-term mindset is one of the keys to investing success.