High inflation has weighed on the stock market this year, though the tech sector has been hit particularly hard. Many investors have abandoned high-growth tech stocks, especially those trading at rich valuations, in an effort to protect their portfolios against a possible recession. As result, the tech-heavy Nasdaq Composite is 25% off its high.

Fortunately, while Wall Street is preoccupied with temporary macroeconomic problems, patient investors have an opportunity to capitalize on the bear market. For instance, Nvidia (NVDA 1.60%) and Roku (ROKU 0.37%) have seen their share prices plunge 51% and 86%, respectively, from their own highs, but shareholders still have good reason to be bullish on both companies.

Here's why I'd buy both stocks without hesitation.

Nvidia: Shaping the future of technology

The Nvidia brand is synonymous with best-in-class graphics and artificial intelligence (AI), and the company has seen tremendous success in the gaming and data center markets. Early on, that success was due to its invention of the graphics processing unit (GPU), a chip designed to render realistic visual effects and accelerate complex applications. But Nvidia has expanded its portfolio to include networking solutions, AI software, and other cutting-edge products.

In 2020, Nvidia invented the data processing unit (DPU), a chip that accelerates data center workloads by offloading networking, storage, and security tasks from central processing units (CPUs). In 2021, Nvidia launched AI Enterprise, a software suite that streamlines the development and deployment of AI applications. The company also introduced Omniverse, a platform for collaborative 3D design and physically accurate simulation.

Today, Nvidia holds over 90% market share in workstation graphics and supercomputer accelerators, and it has consistently achieved top results at the MLPerf benchmarks, a series of tests that measure the performance of AI hardware and software across use cases like image classification, object detection, and language processing.

Unfortunately, with consumer spending under pressure due to inflation, Nvidia took a hit in its fiscal 2023 second quarter (the three months ended July 31). Total revenue rose just 3% to $6.7 billion, fueled by a particularly poor performance in the gaming segment, and earnings plunged 72% to $0.26 per share. While those results are certainly disappointing, the coming years still look exceptionally bright for this semiconductor company.

As a leader in graphics and AI, Nvidia is shaping the future of several exciting technologies, from genomic sequencing and autonomous machines to self-driving cars and the metaverse. To that end, management estimates its market opportunity at $1 trillion. Moreover, Nvidia should benefit from several near-term catalysts, including a new GPU architecture and its first CPU, and its gaming business should rebound as macroeconomic headwinds ease. That's why this growth stock is worth buying now.

Roku: A leader in streaming entertainment

The Roku platform connects consumers, advertisers, and streaming content publishers, which allows the company to monetize its business through digital advertising and digital payments. Specifically, its ad tech platform (Roku OneView) empowers marketers to run targeted campaigns across digital channels like connected TV, desktop, and mobile. And its payments platform (Roku Pay) allows consumers to purchase premium content.

Brand recognition and a first-mover advantage have made Roku the most popular streaming platform in the U.S., Canada, and Mexico as measured by viewing time. And the company has won the loyalty of consumers with Roku OS, the only operating system purpose-built for television. Roku OS creates a better user experience -- think fewer video start failures and fast buffering times -- compared to the modified mobile operating systems used by competitors.

Roku has further differentiated itself with The Roku Channel, an ad-supported service that features free movies, TV episodes, live news, and sports. The company is even producing original content for The Roku Channel, and early results are promising as it ranks as one of the top five channels on the platform in the U.S. as measured by engagement.

Unfortunately, Roku has struggled amid the difficult economic environment. High inflation has caused consumers to rethink discretionary purchases, such as streaming players and smart TVs, and brands have cut their advertising budgets to account for softness in consumer spending. As a result, revenue rose just 18% to $764.4 million in the second quarter, and the company posted a GAAP loss of $0.82 per share.

Many investors were understandably disappointed with those results, but the big picture remains unchanged. Roku is a dominant popular streaming platform, and connected TV ad spend is expected to hit $100 billion in the U.S. alone by 2030, according to BMO Capital Markets. With shares trading at 3.1 times sales -- a bargain compared to the three-year average of 15.1 times sales -- this growth stock is a screaming buy.