Year to date, tech stocks are still on track for a banner year, but some of the air in the rally has come out over the last month or two. Enthusiasm about artificial intelligence (AI) may have peaked, and the Federal Reserve has promised to keep rates higher for longer, likely slowing down the economy further.

However, that sell-off has created a buying opportunity for some stocks, especially if you're willing to take a longer view. Let's take a look at two stocks that look ready for a bull run.

A silhouette of a bull on a hillside.

Image source: Getty Images.

1. PayPal Holdings

Few tech stocks have performed worse than PayPal Holdings (PYPL 2.90%) lately. The fintech titan is now down 81% from its all-time high as its revenue growth has slowed amid broader macroeconomic headwinds and competition from Apple.

However, the pessimism around the stock may have gone too far. Paypal stock is now trading at a price-to-earnings ratio of just 12.5, a valuation generally reserved for low-growth cyclical stocks. But its recent numbers are solid.

Total payment volume increased 11% to $377 billion, while revenue rose 7% to $7.3 billion. Additionally, the company delivered strong margin improvement with generally accepted accounting principles (GAAP) operating income jumping 48% to $1.13 billion. This was due, in part, to earlier layoffs and other cost-cutting efforts.

The company is also aggressively buying back its stock, estimating that it will repurchase $5 billion in stock this year, which is equal to about 8% of its market cap. And after months of uncertainty, PayPal named a new CEO, tapping former Intuit executive Alex Chriss, who just stepped into the hot seat this week.

With Chriss now at the helm, the company's turnaround strategy can begin in earnest, as he'll need to fill key executive positions and streamline the company's corporate portfolio to focus on businesses with the greatest potential to deliver return on investment (ROI).

The important thing to understand about PayPal is that the bar for its success is very low, given its valuation. While the company is sensitive to the macroeconomic environment, PayPal could see growth accelerate when concerns about interest rates and a possible recession eventually fade. 

With roughly $1.5 trillion in total payment volume, PayPal isn't going anywhere, and investors who capitalize on the sell-off should eventually be rewarded.  

2. Taiwan Semiconductor

The artificial intelligence (AI) boom is no secret, and chip designers are ramping up to serve the huge demand for AI infrastructure and the chips that power it. That's great news for Taiwan Semiconductor Manufacturing (TSM 1.26%), the world's largest chip fabricator.

Most semiconductor companies like Nvidia and Advanced Micro Devices don't manufacture their own chips. They are so-called fabless semiconductor designers, strictly speaking, relying on third-party foundries like Taiwan Semiconductor to make the physical product. With the AI boom just starting, that puts Taiwan Semi in an enviable position as it can provide the proverbial picks and shovels for the industry.

It's not all wine and roses. Taiwan Semi's recent numbers reflect the headwinds in the semiconductor industry, as revenue declined 13.7% in U.S. dollars to $15.7 billion. However, the company posted an operating margin of 42%. Management sees sequential revenue growth heading into the third quarter, forecasting $16.7 billion-$17.5 billion in revenue as it ramps up production of its 3-nanometer wafer.

Taiwan Semiconductor's price tag also looks attractive as it trades at a price-to-earnings ratio of just 15. Considering its essential position in the tech supply chain and the upcoming likely rebound driven by demand for AI chips, the stock looks poised for gains into the next year.