The economic slowdown dealt a blow to the stock market in 2022, with the benchmark S&P 500 index losing 20% of its value and spending most of the year in bear territory. But there might be some good news ahead for investors, because the average bear market only lasts about nine-and-a-half months (dating back to 1929). 

Since the current bear market was official in mid-June 2022, we might be a mere four months away from the end. That timeline might also be supported by recent inflation data, given that it has cooled in each of the last five months, which should ease some of the current pressure on the economy.

That's why now might be a great time to buy stocks, particularly those in heavily beaten-down sectors like technology. Consider these interesting stats: According to McKinsey & Company, artificial intelligence (AI) is set to add $13 trillion to the global economy by 2030, with 70% of all companies using it in some way. 

Since shares of AI companies like Lemonade (LMND -0.06%) and C3.ai (AI 1.31%) are down by more than 90% from their all-time highs, here's why this might be a chance to buy in ahead of the industry's projected run of growth. 

1. Lemonade is setting a new standard in insurance

Lemonade is an insurance company using artificial intelligence to shake up the industry, and it has woven the technology throughout nearly its entire business. It uses it to interact with customers through its web-based bot, Maya, which can write an insurance quote in 90 seconds and pay out claims in under three minutes, without human intervention -- a level of convenience that certainly isn't the norm in the insurance industry. 

Lemonade also uses AI to price premiums for customers. Its new lifetime value 6 (LTV6) model determines an appropriate premium based on a person's likelihood of buying multiple policies, their likelihood of making a claim, and even the probability they'll switch to another insurer. Over the long term, the company believes this will result in far more accurate pricing. 

Lemonade's 2022 full-year results aren't in the books yet, but in the third quarter (ended Sept. 30), its customer base soared to an all-time high of 1.77 million, and the average of their premiums hit a record $343. More customers spending more money is typically a winning formula for any company, and as a result, Lemonade's in-force premium grew by 76% year over year to $609 million. 

The company has generated $209 million in revenue over the last four quarters, placing its stock at a price-to-sales ratio of just 4.5. That's the cheapest level since the company listed publicly in 2020, and it comes on the back of a 91% decline in Lemonade stock from its all-time high. Amid the broader tech sell-off, investors have abandoned high-growth companies that aren't turning a profit yet because they're perceived as risky.

But Lemonade says it can reach profitability with the cash it already has on hand, so it's possible the steep drop in its stock price might be overdone. If a new bull market does emerge in 2023, Lemonade is the sort of heavily beaten-down name that could stage a powerful recovery. 

2. C3.ai has pioneered enterprise artificial intelligence

You've probably heard of software-as-a-service (SaaS), where businesses pay a recurring fee to access software platforms to help manage their operations. Well, C3.ai basically offers AI-as-a-service, and it's a trailblazer in this brand-new industry. The company sells ready-made and customizable AI applications to companies in nine different sectors, so it could be a key beneficiary of McKinsey & Company's lofty financial predictions for the rest of this decade. 

C3.ai is especially useful for companies that don't have the expertise or the resources to build AI models from the ground up. Take oil and gas giants, for example; they usually aren't the sort of organizations you'd associate with advanced technologies like AI, yet the fossil fuel industry is C3.ai's largest source of revenue. Companies in that sector use AI to help predict catastrophic equipment failures, and even produce fewer carbon emissions. 

C3.ai also sells its applications jointly with the world's largest providers of cloud services, including Amazon Web Services, Microsoft Azure, and Alphabet's Google Cloud. By integrating C3.ai's technology, those cloud providers can help customers accelerate their adoption of artificial intelligence and grow their businesses more quickly. 

In the second quarter of its fiscal 2023 (ended Oct. 31), C3.ai's revenue growth came in at just 7% year over year, because the company is transitioning from subscription-based billing to consumption-based (pay-per-use) billing. Over the long term, as customers scale up their usage, C3.ai expects this shift will deliver supercharged growth despite any short-term headwinds.

C3.ai stock is down 93% from its all-time high, and after deducting the $840 million in cash, equivalents, and short-term investments on its balance sheet, the market currently values the company at just $390 million. And the stock trades at a price-to-sales ratio of 4.5, the cheapest level in C3.ai's history as a public company.