The stock market never rises in a straight line. Volatility is a common theme in investing, which is why it's important to focus on the long term. 

Since hitting an all-time high near the end of 2021, the Nasdaq 100 technology index plunged by more than 20%, sending it into bear market territory. Then it bounced higher by more than 10% during March before resuming its decline this week. It's proof of how difficult it is to chase short-term market gains.

Amid the sell-off, some technology stocks have declined considerably, which offers an enticing buying opportunity for long-term investors. Here are two worth picking up now, and one to avoid. 

A lawyer digitally signing a document using a tablet on a desk, beside a judge's gavel.

Image source: Getty Images.

The first stock to buy: DocuSign

DocuSign (DOCU 0.10%) was a major beneficiary of the pandemic environment, as its platforms facilitate remote work. It's best known as the leader in digital signature technology, but it has expanded into new verticals in the digital document sphere by leveraging advanced tools like artificial intelligence (AI)

The DocuSign Agreement Cloud is a suite of over 12 applications designed to help organizations manage contracts from the initial drafting, to signing, and also maintaining them as time moves forward. DocuSign Insight, for example, uses AI to analyze agreements to identify potentially problematic clauses, and even opportunities, which helps to save time and also legal expenses. The Agreement Cloud is the ultimate digital partner for companies dealing with a high volume of legal documents. 

DocuSign now has approximately 1.17 million paying users, with over 1 billion people on the platform worldwide. The company just reported its fiscal 2022 full-year results, and despite some pandemic tailwinds fading as society reopens, DocuSign still managed to grow its revenue by 45% to $2.45 billion compared to fiscal 2021. The company is also profitable, growing its non-GAAP earnings per share to $1.98 during fiscal 2022, which was a 120% jump year over year.

DocuSign's stock has fallen 67% from its all-time high, partly because sales growth in fiscal 2023 is expected to be flat. But analysts anticipate further growth in earnings, and as remote work becomes more common even beyond the pandemic, this is a great opportunity to enter the stock for a long-term hold.

An IT professional analyzing a laptop while plugged into a server.

Image source: Getty Images.

The second stock to buy: Alphabet (Google)

This company needs little introduction, as you may have used its services to find this very article. Alphabet (GOOG -1.96%) (GOOGL -1.97%) is the parent company of Google, and it's one of the highest-quality companies in the stock market. It is also one of the most valuable, with a market capitalization of $1.8 trillion.

For those reasons, many investors hold on to their shares with a tight grip, so Alphabet stock is down just 10% from its all-time high right now. But still, it's a dip worth buying for the long term. The organization has diversified far beyond its famous search platform alone and boasts a suite of businesses that tend to do well in most economic environments. 

For example, its Google Cloud platform offers a range of services, including collaborative documents, storage, and even artificial intelligence and machine learning tools. The cloud segment only represented 7.4% of Alphabet's total $257 billion in revenue during 2021, but it grew at 47% year over year, which was faster than the 41% rate for the whole of the company.

Overall, Alphabet stock is cheap right now, with a price-to-earnings multiple of just 24, which is a 27% discount to the Nasdaq 100 technology index. And during rough times in the market, it's a highly secure stock to own for its diversity, growth, and profitability. 

A person using a notebook computer and smartphone with a neutral look on their face.

Image source: Getty Images.

The stock to sell: Twitter

If you have paid any attention to the markets this week, you likely would have heard about Tesla CEO Elon Musk purchasing a 9.1% stake in social media platform Twitter (TWTR), as well as his appointment to its board of directors. Twitter stock soared by as much as 38% once the news was revealed, raising a valid question: How much value can one person bring to the table?

Elon is pushing for some changes to the platform, including an edit button (which was already in the works, according to the company) and a greater commitment to free speech. These could drive more usage and engagement, but one of Twitter's larger problems has been monetization compared to competing social media platforms like Meta Platforms' Facebook.

During the height of the pandemic, Twitter set a goal to reach $7.5 billion in annual revenue by the end of 2023, with 315 million monthly active users (MAU). That's two years away, and reviewing the last two years casts some doubt as to whether it's achievable. From 2019 to 2021, the company grew its revenue from $3.4 billion to $5 billion and its MAU from 152 million to 217 million. That's a two-year growth rate of 47% for revenue and 42% for MAU.

To reach its goals, the company would have to accelerate those two-year growth rates to 48% and 45%, respectively, between now and the end of 2023. It doesn't sound unattainable, but Twitter won't have the benefit of the stay-at-home economy driven by the pandemic -- and the impact of that is already apparent, with MAU growing just 13% from 2020 to 2021. 

Twitter also made net losses in both 2020 and 2021, so it struggled to convert ideal conditions for its platform into earnings for investors. On that note, Twitter stock trades at a price-to-sales multiple of 8. Compare that to Alphabet stock, which trades at a price-to-sales multiple of 7, has a more diverse business, and is basically printing money in terms of profitability.

Put simply, Twitter might be overvalued, and the recent Elon-induced rally could be used as an opportunity to sell.