The stock market has sent investors on a roller-coaster ride this year, particularly the technology sector. At one point, the Nasdaq 100 index was down over 20% and officially in a bear market before bouncing back in March as bargain hunters swooped in.

But rising interest rates and geopolitical tensions across Europe have triggered a resumption of the decline, and another potential buying opportunity for investors. Not all dips are created equal, though, so it's important to be selective about the stocks you buy and always maintain a long-term focus.

Here's one stock to buy and one to avoid while the market remains volatile. 

A low angle view of a person snowboarding mid air.

Image source: Getty Images.

The stock to buy: GoPro

In 2014, the leader in action cameras, GoPro (GPRO -1.12%), was listed on the public markets and initially did quite well. In the eight years since then, its stock price has collapsed by 91%. While that doesn't sound very inspiring, the company has transformed its business model over the last couple of years, and it's starting to bear fruit, so it might be time to ride the comeback. 

GoPro has always designed and manufactured action cameras, but it ran into difficulties generating growth under that one-dimensional model, which spooked investors. To create new revenue streams, the company has entered the subscription space. Almost 1.6 million paid subscribers have signed up to GoPro.com to reap exclusive product discounts, unlimited cloud storage for videos, and the ability to live stream directly from their GoPro cameras.

GoPro.com subscriber growth topped 107% in 2021 compared to 2020. The company is also building a software presence. It started with the Quik app, designed as an alternative to the native camera app on most smartphones. But the company is set to release a desktop editing tool for more-advanced users, which will add yet another subscription tier (and a new revenue stream). 

The result of this transition has been incredibly positive. GoPro is no longer a loss-making company, and it has generated profits in each of the last three years, including $0.90 in earnings per share during 2021. It has attracted the attention of top Wall Street investment banks, with analysts at JPMorgan Chase predicting the stock could soar by 71% from here, to $15 a share. 

But given that the stock trades at a price-to-earnings multiple of just 9.7, it would need to triple just to trade in line with the tech-centric Nasdaq 100 index, which sits at a multiple of 31. Put simply, if GoPro's turnaround sticks, the long term could deliver incredibly exciting returns for investors. 

A person riding their Peloton bike in their bedroom.

Image source: Getty Images.

The stock to sell: Peloton

When it comes to stocks, Peloton Interactive (PTON -2.24%) was one of the poster children of the pandemic. The company makes a range of at-home exercise equipment complete with digital screens allowing for guided workouts, which made it the perfect alternative to the closure of so many fitness centers and gyms. The effects of the stay-at-home economy were obvious, with Peloton stock soaring 725% from its March 2020 low point to its December 2020 peak. 

And that's precisely the challenge Peloton faces. Now that society has mostly reopened, demand for its products has plummeted, and the customers who do continue to use Peloton are far less engaged than they were a year ago. In fact, the average number of monthly workouts per user has collapsed by 40% in the last 12 months alone, from 26 to just 15. 

This has set the company up for a potential 7% drop in revenue during fiscal 2022 compared to fiscal 2021 based on analyst estimates. But that's not the most concerning part: Peloton's net losses are soaring. In the first half of fiscal 2022, the company more than doubled its marketing spend, but revenue grew by only 6% over the same period. The result: a whopping $815 million loss in the last six months.

To Peloton's credit, it is attempting to make drastic changes. A new CEO is at the helm, and he's aggressively cutting costs while redesigning the way the company generates revenue. Peloton is set to focus more on subscriptions, charging a higher recurring fee in exchange for a much lower sticker price on its exercise equipment. The aim is to attract more customers by making the up-front cost less burdensome.

Time will tell whether these changes lead to an improvement, but unfortunately, it's difficult to fight against market forces driven by the fading pandemic. That's why it might be best to sell Peloton stock until it proves it can deliver