If you're a stock investor, 2022 has been a seemingly endless progression of bad news. The Dow Jones Industrial Averages index is down 16% for the year, the S&P 500 is off 21% and the NASDAQ Composite has fallen 30%. When will it end?

Markets don't break out of their funk for no reason. They need a catalyst—like strong corporate earnings, or interest-rate cuts, or, to cite a recent example, the approval of a vaccine to fight a pandemic. The catalysts that I'm looking for currently are signs that inflation has peaked and that interest rates have stabilized.

I don't expect either of those soon. Interest rates are tied to inflation, and there's no evidence that inflation is cooling from its four-decade-high levels. The Federal Reserve is raising interest rates and taking other steps to cool price increases, but it's likely to be months before there's a real impact.

The longer the cloud hangs over the economy and the markets, the gloomier investors get. But it's important to understand that amid all the bad news, stocks that can potentially deliver robust appreciation over many years are effectively on sale. Market selloffs are indiscriminate: Scared investors tend to sell off their quality stocks along with their weaker holdings. Many times, they're selling funds that contain both types of stocks.

That's a gift for discriminating buyers. Apple's price-to-earnings ratio was 35 at the start of 2020; now it's less than 22. Facebook's P/E ratio has fallen from near 20 to around 11. Amazon's P/E has been halved from 2 years ago.

These companies are highly profitable, not the kind of speculative bets whose stocks have cratered throughout 2022. Most of the hot young tech companies are dependent on debt, and as interest rates rise they'll be forced to refinance that debt at higher interest rates. More established companies that are generating profits are free of that trap.

The opportunity to buy shares of great companies at low prices is pretty exciting. But it's also a
little scary, particularly if you have a short-term investing horizon and may need your money back within the next year. That's because it's not clear when the market will hit bottom and stabilize. What's important to remember is that if you have a long investment horizon, say five or 10 years, time is on your side.

Markets are cyclical. Volatility, corrections and bear markets are normal, and it's also normal for markets to find a bottom and rise again. Along the way, certain stocks get repriced lower than warranted, which is the case now. And it's the reason I see potential buying opportunities here.

One factor that might keep investors from buying is concern about stagflation—the combination  of high inflation, high unemployment and a sluggish economy that has historically been hard to reverse. Stagflation made life miserable for many Americans in the 1970s. One big difference between now and then is that unemployment is much lower. And while oil prices were high for much of the 1970s, the current pain at the pump is mostly due to the war in Ukraine.

The war could still stretch on for a while, but the hope is that it won't last nearly as long as high oil prices did in the 1970s. In fact, the end of the Ukraine conflict would likely be a powerful catalyst for markets in and of itself.

Another factor behind current inflation is supply chain issues, and the hope is those will get resolved relatively quickly once Covid is full under control. Again, signs that trade is once again flowing freely could spark a turnaround in markets.

For now, all eyes seem to be on the Fed. Some investors fear the bank won't be able to break the inflationary spiral, and they advocate loading up on commodities and other investments that have historically been more inflation-resistant. I think it's a mistake to fight the Fed, though. It may take time, but I believe the central bank will eventually bring inflation to heel. And that could serve as a powerful catalyst for stocks to pull out of their long nosedive.