The first half of 2022 should serve as a perfect reminder to investors that stock markets do fall, and sometimes quite dramatically. Tech stock investors are particularly aware of just how quick the U-turn can occur.

Over the past 30 years, the growth-oriented Nasdaq 100 index easily outstripped the gains made by the more staid Dow Jones Industrial Average and S&P 500. Populated with the 100 largest nonfinancial stocks on the Nasdaq, and leaning heavily toward the technology industry, the index returned 4,000% over the past three decades versus the near 900% gains by its siblings.

Messy piles of hundred dollar bills.

Image source: Getty Images.

Even over shorter periods of time, the Nasdaq 100 turned in performances that beat the other indexes. Yet beginning last November and continuing on through even today, the index has lost nearly twice as much as either the Dow or the S&P 500 and resides deep in bear market territory. 

But just because the sector is in the dumps doesn't mean you should shy away from tech stocks. Indeed, it's because of the sharp correction that there are now great deals to be had. If you have $1,000 in cash at the ready that won't be needed for bills or to cover emergencies, that's more than enough to invest in the following pair of stocks to buy right now.

C3.ai

C3.ai (AI -0.48%) is tapping into the enormous growth market that is artificial intelligence (AI) by providing solutions for business across data and network security, customer engagement, fraud detection, and supply chains that can be personalized for a customer's individual needs.

Analysts see the AI market growing into a massive $1.6 trillion opportunity by 2030, and though there's a tendency for them to simply draw straight lines up and to the right, there is some sense to this projection and that C3.ai can capitalize on it.

The AI specialist counts members of the energy industry as some of its biggest customers, and it has partnered with oil and gas services giant Baker Hughes to sell its technology into the field on a co-branded basis. And though many of its customers have been enterprise-class businesses, the downturn caused by the pandemic showed C3.ai it needed to widen its lens more, and it has since tailored its technology to businesses of all sizes.

Revenue continues to grow ahead of expectations, and C3.ai recorded a 38% increase in its fiscal fourth quarter that ended April 30. That follows a 42% increase the quarter before, so it's not losing any momentum, and it's in fact expanding into new markets including defense, intelligence, utilities, agriculture, chemicals, aerospace, and manufacturing.

That should help alleviate concerns about customer concentration, and with its stock down 41% in 2022 and off nearly three-quarters from its 52-week high, C3.ai may be one of the best stocks to ride the AI trend.

AT&T

There had long been a sense of pessimism hanging over AT&T's (T 0.70%) stock after the company announced it was going to spin off its Warner Media division and cut its lucrative dividend in half. But savvy investors knew the truth: AT&T would be free from the entertainment division albatross that hung around its neck since it acquired the business and would be able to pay down the large debt it took on to do so.

Also, although the dividend would be smaller, its yield would still be among the highest for other similarly large corporations. Indeed, it yields 5.4% currently, well ahead of the S&P 500's 1.6% yield and the Dow Jones Industrial Average's 1.9% yield. 

AT&T can now focus its investments on its network operations and the rollout of 5G, which is poised to be a significant catalyst for communications.

5G networks are also expected to be worth a lot of money in the very near future, some $31 trillion by 2030, if analyst predictions pan out. It's anticipated carriers like AT&T will receive some $3.7 trillion of that value as consumers spend more on enhanced video, augmented and virtual reality, and digital gaming over the networks.

The telecom is spending billions of dollars to upgrade its wireless infrastructure, and data consumption is where it generates its greatest profit margins. As the company adds tens of thousands of new customers to its rolls, its stock represents a good bet on future growth.