It's not easy making investment decisions during a bear market. High inflation and rising interest rates have sown uncertainty about the U.S. economy's growth potential. That's sent the Nasdaq-100 technology index about 25% lower so far in 2022. 

Naturally, investors might be feeling on edge at the moment. Viewing a portfolio splashed with red ink isn't a pleasant sight, especially when it's unclear when (or how) the economy might recover. But there's a silver lining: History shows that the broader market always recovers to new highs given enough time. For that reason, the current dip could be used as a buying opportunity.

Being selective now is the key to success when things eventually turn around. Here are two stocks on complete opposite ends of the buy/sell spectrum that might offer some guidance on what to look for. 

The stock to buy: Cohu

A great way to find long-term opportunities is to look for industries that have strong tailwinds. The semiconductor sector fits the bill because it's responsible for producing the advanced computer chips that power consumers' most-prized electronics, from smartphones to electric vehicles. These components are a necessity to modern manufacturers, so they'll likely remain in high demand for the next decade or more.

Cohu (COHU 1.78%) doesn't produce any semiconductors itself, but the world's largest chipmakers rely on the company to provide them with critical testing and handling equipment. Cohu's products help ensure that the end user receives chips that are free of defects, and it has implemented advanced technology like artificial intelligence to spot structural faults thinner than a strand of human hair. 

Cohu's equipment not only has to be accurate, but also fast so it doesn't place a strain on the production process. Its Neon inspection platform is designed to rapidly handle chips as small as 0.2 millimeters by 0.4 millimeters, so much so that it can increase production throughout by up to 70%.

Cohu generated a robust 39% year-over-year revenue growth in 2021, to $887 million. It's expected to take a breather in 2022 as the broader economy slows, with analysts expecting sales to decline by 8.8%. However, Cohu recently updated its midterm financial models, and it expects to average $1 billion in annual revenue over the next three to five years, so a return to growth could be around the corner.

Additionally, some estimates suggest the semiconductor industry could be worth over $1.5 trillion annually by 2030, up from an expected $573 billion this year. Cohu is well-positioned to help chipmakers expand their production capabilities to make that value expansion possible. 

The stock to avoid: Robinhood

In contrast to the growing semiconductor sector, the business in which Robinhood Markets (HOOD 2.42%) operates appears to be shrinking. Robinhood is a popular stock and cryptocurrency trading platform that made a name for itself during the pandemic because it attracted hordes of young, first-time investors. Those clients had a tendency to focus on short-term, risky bets that worked while the economy was red-hot. But those investments have generally gone bad more recently (think AMC Entertainment stock, for example). 

Now, Robinhood finds itself with a smaller business with each passing quarter over the last 12 months. In the recent second quarter of 2022 (ended June 30), the company reported having 14 million monthly active users, which was a 34% drop from its peak of 21.3 million at the same time last year. The declining user base, combined with broader stock market losses, resulted in a 37% collapse in Robinhood's assets under custody, to $64 billion.

That might be the most important figure because Robinhood earns the majority of its revenue through transaction volume. If customers are holding less cash and fewer financial assets in their Robinhood accounts, then the company has less revenue-generating power. Therefore, as would be expected, its average revenue per user in the second quarter fell by 50% year over year.

Robinhood users received thousands of dollars in stimulus checks during the pandemic and were subjected to social restrictions, which meant they were spending more time focusing on the markets. It's unlikely the company will ever see such a beneficial environment for its business again. Even the platform's pivot into new assets like cryptocurrencies wasn't enough to reignite users' enthusiasm, as that market has shed 56% of its value in 2022.

The result of all of the above? Robinhood stock has lost 88% of its value since hitting its all-time high. It's one to avoid for the foreseeable future and especially during the current market.