The S&P 500 is just 5 percentage points below its record high, meaning the index is just 5 percentage points from the onset of a new bull market. That is a significant threshold because the S&P 500 has returned an average of 169% during bull markets since 1957, and many stocks are sure to soar during the next one.

Investors hoping to benefit should be putting money into the market today, and it doesn't take much to get started. For instance, both UiPath (PATH 0.93%) and Adyen (ADYE.Y 2.64%) have share prices below $20 apiece, and more importantly, both stocks are compelling buys at their current valuations. Here are the details.

1. UiPath

UiPath specializes in robotic process automation (RPA), a technology that can automate simple and repetitive tasks like moving files or extracting data from a structured document. But its software is also embedded with artificial intelligence (AI) capabilities that support more sophisticated automation, such as understanding and taking action on data extracted from an email.

The UiPath automation platform allows businesses to (1) identify automation opportunities with task mining and process mining tools, (2) build software automation that addresses those tasks and processes, and (3) optimize that automation over time. UiPath is a recognized leader in several relevant software categories, including RPA, task mining, process mining, and intelligent document processing.

Despite the difficult economic backdrop, UiPath reported decent financial results in the second quarter. Revenue increased 19% to $287 million, and non-GAAP (generally accepted accounting principles) net income improved to $49 million, up from a loss of $11 million. Investors can expect similar momentum in the future as UiPath leans into its $60 billion addressable market with new AI products.

For instance, Clipboard AI is a tool that intelligently copies and pastes data between documents, applications, and spreadsheets. TIME recently lauded it as one of the best inventions of 2023, and the International Data Corp. praised the company in a recent report: "UiPath's success and broad market leadership as an AI-powered automation platform puts it in a great position for capturing growth."

With that in mind, Morgan Stanley expects UiPath to grow revenue at 13% annually over the next decade. In that context, its current valuation of 8.8 times sales looks relatively cheap. That's why this growth stock is a no-brainer buy right now.

2. Adyen

European fintech Adyen simplifies digital payments for merchants. Its full-stack platform consolidates payment processing and acquiring services for online, mobile, and in-person transactions. In other words, Adyen handles everything from authorizing transactions with issuing banks to settling funds in merchant accounts, and it provides those services across physical and digital channels.

By consolidating the payments value chain, Adyen captures more comprehensive data than stand-alone payment processors or acquiring banks. It uses that information to improve authorization rates, prevent fraudulent transactions, and surface insights for merchants. The company also provides adjacent financial services for marketplaces, including the ability to create bank accounts, issue payment cards, and distribute funds in real time.

The Adyen value proposition -- the seamless acceptance of digital payments across multiple sales channels without a patchwork of different processors and acquirers -- has attracted a broad range of businesses, from McDonald's and Microsoft to Etsy and Uber.

Adyen reported worse-than-expected financial results in the first half. Revenue increased 21% to 739 million euros, missing the consensus estimate (40% growth) by a wide margin. Earnings before interest, taxes, depreciation, and amortization (EBITDA) also slipped 10% to 320 million euros as headcount expansion caused margins to contract. The stock fell nearly 40% following the report, but that seems like a big overreaction.

Economic headwinds are temporary, and the headcount expansion supports future growth. Indeed, management is targeting revenue growth from mid-20s to low-30s in the medium term, and Morningstar analyst Niklas Kammer expects revenue growth of 16% over the next decade. Those forecasts make its current valuation of 5.8 times sales appear cheap, especially when the three-year average is 10 times sales. That's why this fintech stock is a no-brainer buy for patient investors.