Investor sentiment has improved substantially year to date as cooling inflation, a resilient labor market, and stronger-than-expected economic growth have mitigated recession fears to some degree. By no means has the possibility of a recession disappeared, but all three major U.S. stock indexes still increased in value in the first half of 2023.

The blue chip Dow Jones Industrial Average jumped 3.8%, and the broad-based S&P 500 increased 15.9%. But the technology-centric Nasdaq Composite (^IXIC 2.02%) stole the spotlight by soaring 31.7%. That was the index's best first half since 1983 and its third best since its inception in 1971.

Here's what history says will happen next.

History says the Nasdaq could decline in the short term

The Nasdaq Composite's phenomenal performance in the first half of 2023 is only outshone by its returns in two other years: 1975 and 1983. However, the technology-heavy index declined in the second half of both those years. Specifically, it fell 10.8% in the latter half of 1975 after skyrocketing 43.4% during the first. And it fell 13.4% during the second half of 1983 after climbing 38.2% earlier in the year.

Two data points hardly qualify as a pattern, and investors should remember that past results never guarantee future returns, but there is no denying the Nasdaq could decline during the latter half of 2023. Historically, during years when the index rose more than 30% in the first half, it also dropped by an average of 12.1% in the second half.

But there is some good news for patient investors.

History says the Nasdaq is headed higher in the long term

The Nasdaq Composite has battled three recessions and several monumental market crashes in the last 30 years, but the index still returned 1,840% (or 10.4% annually) during that time period, more than doubling the overall return of the S&P 500. Investors have good reason to believe that outperformance will continue. Three decades' worth of data certainly qualifies as a pattern.

Patient investors can capitalize on that by periodically purchasing shares of a Nasdaq Composite index fund. The Fidelity Nasdaq Composite Index ETF (ONEQ 2.11%) measures the performance of more than 1,000 growth stocks, many of which come from the information technology sector. The fund provides exposure to some of the largest and most innovative companies in the world, meaning fundholders are well positioned to benefit from explosive growth in areas like artificial intelligence (AI), cloud computing, and digital advertising.

Details on the top five holdings are provided below.

1. Apple (AAPL -0.35%) has a strong market presence in smartphones, tablets, and smartwatches, and its services business is thriving atop an installed base of 2 billion active devices. For instance, Apple runs the most popular mobile app store in the world, and Apple Pay is the most popular in-store mobile wallet in the U.S.

2. Microsoft (MSFT 1.82%) is the market leader in several enterprise software categories, including business intelligence, enterprise resource planning, office productivity, and certain cybersecurity verticals. Microsoft Azure is also the second-largest cloud computing business in the world, and its exclusive partnership with OpenAI could be a meaningful growth driver.

3. Alphabet (GOOG 9.96%) (GOOGL 10.22%) is the largest adtech company in the world due to the popularity of web properties like Google Search and YouTube. Alphabet also runs the third-largest cloud computing business in the world, and its subsidiary Waymo was the first company to launch a commercial autonomous ride-hailing service.

4. Amazon (AMZN 3.43%) runs the most visited online marketplace on the planet, and its ability to engage consumers and collect shopper data has helped it become the third-largest adtech company in the world. Additionally, Amazon Web Services has led the cloud computing market for 12 consecutive years.

5. Nvidia (NVDA 6.18%) is the market leader in workstation graphics and supercomputer accelerators, and its graphics processing units are the gold standard in AI infrastructure. Nvidia has also branched into subscription software products and cloud services, building on its brand authority as a chipmaker. Those products further its ability to capitalize on trends like machine learning, robotics, virtual reality, and the metaverse.

Here's the bottom line: The Nasdaq Composite may or may not decline in the second half of 2023, but history says patient investors who buy and hold a Nasdaq Composite index fund will be well rewarded over the long term.