Investors are worried about the economy, both in the U.S. and on a global scale. High inflation and rising interest rates threaten to slow consumer spending and weaken corporate growth, potentially triggering a recession. That concern has sent the stock market plunging over the past year. The broad-based S&P 500 has fallen 23% since last peaking in January 2022, and the tech-heavy Nasdaq Composite has dropped 33% since last peaking in November 2021. That puts both indexes in bear market territory.

Losses of that magnitude can be alarming, but investors can take solace in one simple truth: The S&P 500 and the Nasdaq Composite have been through bear markets before, and both indexes have always recovered. There is no reason to believe this time is any different. That makes the current downturn a buying opportunity, and one smart way to capitalize is by investing in index funds that track the S&P 500 and the Nasdaq Composite.

Person sitting at desk looking at downward pointing charts on computer screen.

Image source: Getty Images.

Here are two great examples.

1. Vanguard S&P 500 ETF

The Vanguard S&P 500 ETF (VOO 0.87%) aims to track the performance of the S&P 500, a diversified index often viewed as a benchmark for the entire U.S. stock market. The ETF is invested in 500 of the largest U.S. companies, representing a blend of value stocks and growth stocks. Its components cover all 11 market sectors, though certain sectors are weighted more heavily, meaning they have a greater impact on performance.

The chart below shows the sector allocation of the Vanguard S&P 500 ETF.

Stock Market Sector

Vanguard S&P 500 ETF Allocation

Information technology

26.4%

Health care

15.1%

Consumer discretionary

11.7%

Financials

10.9%

Communications services

8.1%

Industrials

7.9%

Consumer staples

6.9%

Energy

4.6%

Utilities

3.1%

Real Estate

2.8%

Materials

2.5%

Data source: Vanguard.

Over the past decade, the Vanguard S&P 500 produced a total return of 212%, which is about 12% annually. At that pace, $100 invested on a weekly basis would grow into $96,700 over a decade, and it would grow into $1.3 million over three decades. That means young investors could easily build million-dollar portfolios by retirement, and without even doing much work.

It's worth noting that Warren Buffett has regularly recommended an S&P 500 index fund as the best way to gain stock market exposure for most investors. In fact, Buffett once made a bet that he could outperform a team of 200-plus hedge fund managers with nothing more than an S&P 500 index fund. Buffett won that bet.

In closing, the Vanguard S&P 500 ETF has a very low expense ratio of 0.03%, meaning the fee on a $10,000 portfolio is just $3 per year. With that in mind, this ETF is a great option for investors that want diversification across the U.S. stock market.

2. Fidelity Nasdaq Composite ETF

The Fidelity Nasdaq Composite ETF (ONEQ 1.08%) aims to track the performance of the Nasdaq Composite, an index often viewed as a benchmark for tech stocks. The Fidelity ETF comprises more than 1,000 U.S. and international companies, representing a concentrated portfolio of large-cap growth stocks. Its components span all 11 market sectors, but the ETF is heavily weighted toward information technology.

The chart below shows the sector allocation of the Fidelity Nasdaq Composite ETF.

Stock Market Sector

Fidelity Nasdaq Composite ETF Allocation

Information technology

43.7%

Consumer discretionary

16.8%

Communications services

13.9%

Health care

8.7%

Consumer staples

4.7%

Industrials

4.5%

Financials

4.4%

Utilities

1%

Real Estate

0.9%

Energy

0.8%

Materials

0.3%

Data source: Fidelity.

The tech-heavy nature of the Nasdaq Composite makes it much more volatile than the S&P 500, as evidenced by the current downturn. The Nasdaq Composite is 34% off its high, but the S&P 500 has fallen just 23%. But there are two sides to volatility, and the Nasdaq Composite has easily outperformed the S&P 500 over the long term.

On that note, the Fidelity Nasdaq Composite ETF generated a total return of 295% over the past decade, which is the same as 14.7% per year. At that pace, $100 invested on a weekly basis would grow into $111,600 over a decade, and it would grow into $2.3 million over three decades.

However, that outperformance comes with a slightly higher fee. The Fidelity Nasdaq Composite ETF has an expense ratio of 0.21%, meaning investors will pay $21 per year on a $10,000 portfolio. All things considered, this ETF is a great option for risk-tolerant investors looking for exposure to growth stocks, especially growth stocks in the tech sector.