The Nasdaq Composite fell 33% last year as economic uncertainty rattled investors. It was the worst annual performance for the index since the Great Recession in 2008-09, and the tech-heavy index is still deep in bear-market territory. Some wealthy hedge fund managers are ignoring the economic turmoil and, instead, treated the drawdown as a buying opportunity.

In the fourth quarter, Steven Cohen of Point72 Asset Management started positions in Upstart Holdings (UPST 1.81%) and Cognex (CGNX 0.11%). Meanwhile, Ray Dalio of Bridgewater Associates took a stake in Upstart, and Kenneth Jacobs of Lazard Asset Management increased his position in Cognex.

Is it time for the rest of us to buy these two artificial intelligence (AI) stocks, too?

1. Upstart Holdings: AI-powered credit decisions

Upstart uses AI to help banks and credit unions lend money more efficiently. For decades, the FICO score has been the industry standard in determining which borrowers qualify for a loan and at what interest rate. But even sophisticated FICO-based models are prone to inaccuracy because they are simple rules-based systems that consider a limited amount of information, often no more than 30 variables per borrower.

Upstart leans on AI to analyze more than 1,500 variables per borrower. Its platform measures those data points against past repayment events to predict outcomes like fraud and default, creating a flywheel effect that improves its AI each time someone makes or misses a payment. Ultimately, Upstart helps lenders operate more profitably by improving their ability to quantify risk. Upstart management says its AI models separate high-risk borrowers from low-risk borrowers with 4 times greater precision than FICO scores.

Yet Upstart faced monumental headwinds over the past year as the cyclical lending industry shifted into a contractionary phase. Borrower delinquency rates and defaults rose in response to high inflation and rising interest rates, so banks naturally became more cautious about lending money. Additionally, the already-tumultuous economic environment made lenders especially hesitant to adopt new technology like Upstart's AI platform.

Collectively, those challenges led to dismal financial results for Upstart in 2022. Revenue dropped 1% to $842 million, and the company reported a GAAP loss of $109 million, down from a profit of $134 million in the prior year. Worse yet, management expects revenue to fall 68% in the first quarter of 2023 as the headwinds discussed above persist.

On the bright side, long-term investors still have reason to be optimistic. Upstart is targeting a $1.5 trillion addressable market, and it appears to have a competitive advantage. The company already demonstrated that its AI can calculate risk more precisely than FICO scores during expansionary periods of the credit cycle, and if it achieves the same success during the current contractionary phase, lenders will probably rush to adopt its technology.

With that in mind, shares currently trade at nearly 2 times sales. That looks cheap for a company with as much potential as Upstart. For that reason, risk-tolerant investors should indeed consider buying a small position in this growth stock today.

2. Cognex: AI-powered factory automation

Cognex specializes in machine vision, a specific type of AI that captures and analyzes visual information for the purpose of factory automation. The company provides machine vision systems and software to customers in most industries, though its technology is heavily used in the logistics, automotive, and consumer electronics markets. In a nutshell, Cognex products identify, track, measure, and inspect parts or packages, helping businesses automate portions of the manufacturing, distribution, and quality assurance processes.

Unfortunately, Cognex struggled with a number of headwinds over the past year. The company lost $20.8 million in assets during a fire in June 2022, and it paid a significant premium to replenish the destroyed inventory, which reduced its gross margin by 400 basis points. Meanwhile, the difficult economic environment also posed a problem. Unfavorable foreign exchange rates negatively impacted revenue by 400 basis points, and many businesses reduced their spending on machine vision technology.

Collectively, those difficulties led to disappointing financial results for Cognex in 2022. Revenue dropped 3% to $1 billion, and GAAP net income dropped 23% to $216 million. As a caveat, management expects revenue to fall even more sharply in the first quarter, due in large part to reduced demand for logistics products from a few large e-commerce customers.

However, Cognex is well positioned to reaccelerate growth in a more favorable economic environment. Most industries are still early in their adoption of machine vision technology, but that is changing. Cognex says its $6.5 billion addressable market will grow at 13% annually for the foreseeable future. More importantly, the company believes it will grow even faster: Management is targeting 15% annualized revenue growth and a 30% profit margin over the long term.

Currently, shares trade at 8.3 times sales, a discount compared to the three-year average of 13.1 times sales. That creates an attractive buying opportunity for investors.