Interest rates have risen faster than they have in a generation, and after more than a decade of near-zero benchmark rates, investors are trying to adjust to a new set of rules.

Stocks have been in a bear market for more than a year now, and real estate prices have begun to come down on a year-over-year basis and rising mortgage rates have caused monthly payments for newly purchased homes to surge.

It's understandable if you're afraid to invest in the stock market right now. Most economists think the economy is headed for recession; inflation remains high and the Federal Reserve has committed to leaving interest rates elevated until inflation approaches its target of 2% annual growth.

Berkshire Hathaway CEO Warren Buffett.

Image source: The Motley Fool.

Buffett's words of wisdom

If you're thinking that now's a bad time to buy stocks, at least one prominent investor disagrees with you. 

Berkshire Hathaway (BRK.A 1.66%) (BRK.B 1.35%) CEO Warren Buffett has said before that history has shown that buying stocks when interest rates are high has turned out to be the right move. Here's what he had to say at the 2000 Berkshire Hathaway shareholder meeting:

The best time to buy stocks actually was, in recent years, you know has been when interest rates were sky high and it looked like a very safe thing to do to put your money into Treasury bills --  well actually the primary got up to 21.5% as attractive as that appeared, it was exactly the wrong thing to be doing. It was better to be buying equities at that time because when interest rates changed, their values changed even much more.

What Buffett is pointing out is simply that the effect of interest rates swings both ways. While rising interest rates are a headwind on stock prices, falling interest rates are a tailwind and a strong enough one that buying stocks in a high-interest-rate environment has historically been a better move than buying bonds.

As the chart below shows, the S&P 500 nearly doubled from 1982 to 1987, as 10-year Treasury yields fell from above 15% to around 7%, and that doesn't include the 5% dividend yield investors would earn buying the S&P 500 in 1982. That return tops earning a 15% coupon on bonds.

10 Year Treasury Rate Chart

10 Year Treasury Rate data by YCharts

More recently, in 2017, Buffett shared his thoughts on the importance of interest rates, saying, "The most important item over time in valuation is obviously interest rates. If interest rates are destined to be at very low levels... It makes any stream of earnings from investments worth more money."

In other words, investors who are wondering when the right time to buy stocks is should ask where interest rates are headed.

What the Fed says

Based on the expected long-term direction of interest rates, this could be a good time to buy stocks.

Though the Federal Reserve expects to raise the benchmark federal funds rate by another 25 basis points to 5%-5.25% later this year, over the next few years, it expects rates to come down, falling by about a point in 2024 and 2025, and hitting a rate of 2.5% over the long run.

That's just a forecast and could change according to economic conditions, but it should offer investors some reassurance that stocks should recover their losses over the last year or so as interest rates should eventually come back down.

Interest rates are still a far cry from where they were in the 1980s, but the relationship between interest rates and stock valuations hasn't changed, and as Buffett explains, interest rates are a fundamental determinant of asset prices.

While investors may be frustrated with the lingering bear market and the Fed's actions over the last year, they could soon reap the benefits if the central bank's forecast proves accurate.