The stock market is testing all-time highs again just about a year after it hit bottom in the post-pandemic bear market, as a new AI boom and signs of lower interest have led investors to turn bullish.

However, that doesn't mean it's too late to invest. In fact, a new bull market may just be getting ready to get underway -- many experts don't consider a new bull market to have officially begun until the S&P 500 sets a new all-time high. And even though plenty of tech stocks have been big gainers this year, there are still some great buys right now.

A young man doing stock market research with several monitors.

Image source: Getty Images.

1. Taiwan Semiconductor

Artificial intelligence (AI) has been the big story of 2023, propelling stocks like Nvidia to monster returns, but Nvidia isn't the only chip stock that stands to benefit from the new technology. Another semiconductor company to watch is Taiwan Semiconductor Manufacturing Corporation (TSM 1.26%).

Also known as TSMC, it's the world's biggest contract semiconductor manufacturer -- the company that fabless chip designers like Nvidia and big tech companies like Apple count on to produce their chips. Among its many other clients are Broadcom, Advanced Micro Devices, and Qualcomm.

The company dominates the third-party semiconductor manufacturing space with a 58% market share as of the third quarter.

As you might expect, that market power and scale have enabled TSMC to generate wide profit margins. In the third quarter, it reported an operating margin of 41.7%, even as revenue declined due to a broader slowdown in the semiconductor industry related to oversupply and weak PC sales.

The company also stands to be a big winner from increasing demand for AI chips as TSMC has an even larger market share in the production of the most advanced chips -- the kinds used to support and train artificial intelligence applications. The company anticipates an easing of the supply shortage of AI chips in 18 months, and as production ramps up, TSMC should be a winner. TSMC is also opening new plants in the U.S. and elsewhere in preparation for increasing demand.

TSMC is also affordably priced at a price-to-earnings ratio of 19.

2. The Trade Desk

Another tech stock worth putting on a buy list for 2024 is The Trade Desk (TTD 1.67%), the leading independent demand-side platform (DSP) in the adtech industry.

The company's cloud-based, self-serve platform allows ad agencies and brands to manage and optimize their ad campaigns across multiple channels, and The Trade Desk has a stellar reputation with its customers. At least 95% of its customers have renewed their contracts in every quarter for the last nine years.

The Trade Desk has been a top performer on the stock market since its 2016 IPO, and is up nearly 2,000% over that period. But this looks like a great buying opportunity for the stock. The stock tumbled after its latest earnings report as guidance for the fourth quarter was light, calling for roughly 18% in revenue growth during the key holiday period. While that was less than analysts had expected, it's still better than the industry-level growth.

Looking ahead, ad spending is expected to pick up as interest rates come down and as businesses gain confidence that there won't be a recession. That should favor The Trade Desk next year, especially as the company plans to open up its new AI ad-buying platform, Kokai, to customers next year. The platform should improve return on investment for customers, which should help the company with customer acquisition and increase platform revenue.

The Trade Desk is also solidly profitable for a fast-growing stock, and while shares might be expensive on a price-to-earnings ratio basis, the company is still growing rapidly and penetrating a roughly $1 trillion digital advertising market.

The expected slowdown in revenue growth in the fourth quarter should be a blip. Investors can take advantage of the current discount and a likely recovery in the stock by buying shares today.