In July, analysts at Bank of America came out with a pretty somber forecast for the S&P 500 through the end of 2022. They revised their year-end target for the benchmark from 4,500 to 3,600 at the end of this year.

With the S&P 500 at 4,200 as of Aug. 25, that would mean it would drop another 14% by the end of the year, on top of the 12% it is already down. And the Nasdaq Composite is already in bear market territory, down about 20% year to date as of Aug. 25.

That's not to say Bank of America's forecast will be correct. The market could surge higher the rest of the year. But the uncertainty has caused many investors to sit on the sidelines and wait for the market to turn back north. It raises the question: Should you really be buying stocks right now? While it is prudent to be cautious, it is also smart to be opportunistic. Here's why.

Bad news can be good news

You have no doubt heard the famous Warren Buffett quip: "Be greedy when others are fearful and be fearful when others are greedy." That is easier said than done for the average investor, but the larger point is, down markets are a great time to find good, cheap stocks that will grow and flourish when the market does turn around.

As Buffett himself told The New York Times back in 2008: "Bad news is an investor's best friend. It lets you buy a slice of America's future at a marked-down price."

Some of Buffett's best and most lucrative purchases came in down markets. Buffett bought Berkshire Hathaway's second-largest current holding, Bank of America, in August 2011 when it was trading at around $6 per share. It is now trading at $35 per share -- even though it is down 21% year to date. Still, that investment has posted a 17% annualized return for Buffett.

Now, not all investors have the expertise or track record of Warren Buffett, but just as there was after the Great Recession, there are a lot of good stocks available at low valuations right now, if you know where to look.

What to look for

The first thing to know is that bear markets do not last as long as bull markets. According to an analysis by the Hartford Funds, the average bear market lasts about 289 days, or just over nine months, while the average bull market lasts about 991 days or 2.7 years. Further, stocks on average lose 36% during a bear market and gain 114% in a bull market.  

It is also worth noting that about half of the S&P 500's best days in the last 20 years occurred during a bear market, while another 34% occurred in the first two months of a bull market. So, there is indeed value in adding to your current or investing in new stocks.

But proceed cautiously, as there remains a lot of uncertainty out there. Your best bet is to find companies that have seen their valuations drop, as measured by price-to-earnings (P/E), price-to-book (P/E), or price-to-sales (P/S) ratios. Also, look for companies that are established in their industries or markets with a history of consistent earnings and revenue increases. 

Generally speaking, stocks that still have high valuations, a disproportionally high amount of debt, relatively little cash flow, high expenses, and a spotty history of profitability or earnings should raise red flags.

So, yes, you should be looking to invest in stocks right now, but proceed cautiously and do your research.