2023 is gearing up to close on a promising note for the U.S. stock market, a marked change from the disappointing performance of 2022. The benchmark S&P 500 index has gained nearly 20% so far this year and is up by 28% from its bear-market low of October 2022. The technology-heavy Nasdaq Composite has also gained a solid 37% so far in 2023.

Now's a great time for investors to consider picking up stocks that are riding solid secular tailwinds such as artificial intelligence (AI) and digital payments. Nvidia (NVDA 6.18%) and PayPal (PYPL 2.90%) are piquing my interest as impressive buy-and-hold opportunities for long-term investors.

1. Nvidia

Accelerated-computing leader Nvidia has consistently surpassed analyst revenue and earnings estimates for over a decade and has posted blowout quarterly results throughout 2023. Unsurprisingly, shares of the company have gained nearly 220% so far this year.

Nvidia has been very successful in capitalizing on the AI trend thanks to its well-established dominance in the GPU space. The increasing adoption of AI and machine learning has driven up demand for Nvidia's cutting-edge AI GPUs, far more than the current supply. According to some estimates, Nvidia now accounts for nearly 80% of the AI chip market. Plus, the company's Compute Unified Device Architecture (CUDA) parallel programming platform and programming model used for general computing on GPUs is also benefiting from a sticky user base. The CUDA software toolkit has been used by nearly 4 million developers and downloaded over 40 million times.

Nvidia's data center segment is a major growth driver, with revenue surging by 279% year over year to $14.5 billion in the third quarter. CEO Jensen Huang has estimated that $1 trillion worth of data center infrastructure will be upgraded in the next four years to optimize them for AI workloads. Considering Nvidia's existing moat in this market and its commitment to continuous innovation, the company seems well positioned to leverage this opportunity.

Furthermore, Nvidia's gaming segment revenue grew by 81% year over year to nearly $3 billion in the third quarter. While gaming GPU demand has been muted in the past few quarters mainly due to the lackluster PC market, the third-quarter performance hints at a recovery in this segment.

Nvidia stock trades at a price-to-sales (P/S) ratio of 26, far higher than the median semiconductor industry multiple of 3. While this may seem quite expensive, the company's growth potential in the rapidly growing data center market and its AI capabilities make it an obvious pick for the next decade. Investors could also limit their risk by opting for a dollar-cost-averaging strategy and building a position in Nvidia over time.

2. PayPal

Once a hot favorite of the stock market, fintech company PayPal is currently trading nearly 81% down from its peak. In the past year, the company has faced a challenging phase marked by a significant drop in consumer discretionary spending and multiple transitions and changes in its roster of executives. With people moving back to shopping in physical stores, PayPal has also seen a modest decline in active accounts in the past three quarters. Despite this, the company's core business has proved quite resilient and is now showing signs of recovery.

In the third quarter of fiscal 2023, PayPal's revenue was up 8% year over year to $7.4 billion, while non-GAAP (adjusted) earnings per share (EPS) surged by 20% to $1.30. The metrics are moving in the right direction, especially as newly appointed Chief Executive Officer Alex Chriss plans to focus on PayPal's profitable growth by streamlining operations and reducing costs. Instead of focusing on just increasing active accounts, the CEO is now aiming for high-quality customer growth.

Undoubtedly, PayPal has failed to grow rapidly in the past year, posting only high-single-digit revenue growth. While this is disappointing for a digital payments behemoth, the company is now attempting to reaccelerate its growth by improving its product offerings and go-to-market strategy.

The company has rolled out passkeys to over 10 million customers to improve the sign-in experience, set up fraud alerts for all the cards in the PayPal wallet, and included PayPal- and Venmo-branded credit and debit cards in Apple and Google wallets. The company also plans to leverage data collected from its network (428 million active accounts, which include 35 million merchants) to personalize the branded checkout experience and make it more smooth.

PayPal is currently trading at a price-to-sales ratio of 2.6, far lower than its five-year average of 6 times. This bargain-basement price compensates investors for most of its headwinds. Considering the company's focus on profitability and innovations, the stock seems to have an impressive upside in the long run, making it an attractive buy-and-hold for the next decade.