Recession fears landed the S&P 500 in a bear market last year, and the broad-based index is still down 17%. That decline has undoubtedly put a dent in many portfolios, and steep losses often lead to irrational decisions. But investors need to focus on the facts: Every past bear market has ended in a new bull market, and drawdowns brought on by widespread fear have historically been an excellent time to invest. In fact, Warren Buffett has often encouraged investors to "be greedy when others are fearful."

Here are two perfect index funds to buy and hold forever.

A good option for risk-tolerant investors

The Vanguard S&P 500 ETF (VOO -0.07%) measures the performance of the S&P 500, a diversified financial index comprising 500 large-cap U.S. stocks. Those equities span all 11 market sectors, ranging from value stocks to growth stocks, and the underlying businesses represent the very heart of the U.S. economy. To that end, the Vanguard S&P 500 ETF lets investors buy a slice of the most influential American businesses.

The top 10 holdings in the Vanguard ETF are detailed below:

  1. Apple: 6.3%
  2. Microsoft: 5.4%
  3. Amazon: 3.3%
  4. Alphabet: 2.7%
  5. Berkshire Hathaway: 1.6%
  6. Nvidia: 1.4%
  7. ExxonMobil: 1.4%
  8. UnitedHealth Group: 1.4%
  9. Tesla: 1.4%
  10. Johnson & Johnson: 1.3%

As a staunch believer in American business, Buffett has frequently advised investors to buy an S&P 500 index fund. In fact, he once told CNBC that investors should "keep buying it through thick and thin, and especially through thin." That recommendation makes sense. The S&P 500 has recouped its losses from every past bear market, and it has produced a positive return over every rolling 20-year period in the last century. That means the Vanguard S&P 500 ETF will almost certainly be a profitable investment over the next two decades.

In fact, investors can reasonably expect a sizable profit. The S&P 500 generated a total return of 631% over the last two decades, or 10.5% annually. At that pace, $150 invested weekly in the Vanguard S&P 500 ETF would be worth $473,000 two decades down the road, and it would be worth $1.4 million in three decades.

As a caveat, the Vanguard S&P 500 ETF is heavily weighted toward the technology sector, and it includes a large number of growth stocks. Those factors occasionally leads to extreme price volatility. That makes the ETF a good option for risk-tolerant investors.

A good option for risk-averse investors

The Vanguard S&P 500 Value ETF (VOOV -0.05%) measures the performance of the S&P 500 Value Index, which follows about 400 value stocks in the S&P 500. In other words, it tracks a less volatile subset of the broader S&P 500 by omitting the top 100 growth stocks. To that end, the Vanguard S&P 500 Value ETF lets investors spread capital across some of the most stalwart American businesses.

The top 10 holdings in the Vanguard ETF are detailed below.

  1. Microsoft: 4.7%
  2. Berkshire Hathaway: 3.4%
  3. Amazon: 3%
  4. JPMorgan Chase: 2.5%
  5. Meta Platforms: 2%
  6. Bank of America: 1.5%
  7. Walmart: 1.2%
  8. Cisco Systems: 1.2%
  9. Walt Disney: 1.2%
  10. Wells Fargo: 1.1%

In general, value stocks offer less upside and more stability, while growth stocks offer more upside and less stability. Not surprisingly, value stocks have underperformed the broader market over long periods of time. As mentioned earlier, the S&P 500 produced a total return of 631% over the last two decades, or 10.5% annually. But the S&P 500 Value Index produced a total return of 532% during that time, or 9.7% annually.

However, value stocks have historically outperformed during periods of economic turmoil. The S&P 500 is currently 17% off its high, but the S&P 500 Value Index is only down 6%. That makes the Vanguard S&P 500 Value ETF a great choice for risk-averse investors who want exposure to the stock market.