For some, $1,000 might not seem like enough money to invest to get a great return in the stock market. But if you have a long enough investment time horizon and pick the right investment, $1,000 could eventually grow into $1 million. Buying stocks like Amazon, Home Depot, Microsoft, and Berkshire Hathaway at the right time has all delivered such returns to early investors.

Now is also a great time to invest as the artificial intelligence (AI) bull market has just become official, with the S&P 500 regularly hitting new all-time highs. If you've got $1,000 to invest -- about a week's paycheck for the average American -- here are two great stocks to put that money to work in.

A man with money swirling around above him.

Image source: Getty Images.

1. Broadcom: a long-term AI winner

Chip stock Broadcom (AVGO 3.84%) hasn't gotten nearly as much attention as peers Nvidia or even Advanced Micro Devices in the AI race, and it's easy to see why. The company's recent results have been modest, and it doesn't specialize in the kind of GPU and related processors that have made Nvidia so in demand.

Instead, the company is known for networking and connectivity solutions such as routers, switches, and network adapters, which are expected to play a role in the AI boom. While revenue grew just 4% year over year in the most recent quarter to $9.3 billion, management said it's seeing demand build for networking components for generative AI.

In the fiscal 2023 fourth quarter (ended Oct. 29, 2023), generative AI revenue, including ethernet solutions and custom AI accelerators, made up close to $1.5 billion in revenue, or about 20% of its semiconductor revenue. Looking ahead to fiscal 2024, the company expects networking revenue growth to accelerate to 30%, and it sees generative AI representing more than 25% of semiconductor revenue.

Broadcom is also highly profitable, a strong indication of competitive advantages in its corner of the semiconductor sector, and CEO Hock Tan is known for running a lean operation. In the fourth quarter, Broadcom reported a 65% margin based on adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA).

The stock also trades at a reasonable price-to-earnings ratio of 29, and its growth will get a boost this year from its recent acquisition of VMWare, a maker of virtualization software. Broadcom also has a long-term record of outperforming the market, and it's a good bet that will continue.

2. The Trade Desk: Leading the digital advertising transition

AI may be the most important growth trend in the stock market, but digital advertising has been another source of huge growth. While Alphabet and Meta Platforms are two of the most obvious winners, ad tech companies have also seen significant growth, and The Trade Desk (TTD 1.67%) is the leading independent ad tech platform.

After a lull during the 2022 bear market, there are signs that digital ad spending is starting to spring back to life. Alphabet and Meta both reported accelerating revenue growth for the quarter, and most economists now believe that the economy will avoid a recession, which should help persuade brands to spend more on advertising.

The Trade Desk is well-positioned to take advantage of the next advertising boom. First, the company's Unified ID 2.0 (UID2) protocol is the leading candidate to replace third-party cookies on Google Chrome, which are expected to disappear by the second half of the year.

It's also launched its own AI platform, Kokai, which distributes deep learning algorithms across the digital media buying process, improving measurement data, user interface, and return on investment, by choosing the right ad impressions at the right price. While management announced Kokai last year, it's planning on making most of the new features available this year, and that should help drive the company's growth and keep it ahead of the competition.

Finally, Trade Desk has managed to deliver strong growth through a challenging period in its industry, and the stock is trading at a discount after it sold off because of weak guidance in its third-quarter earnings report. That gives investors a great opportunity to buy the stock at a good price, as the company looks well positioned for a strong 2024, especially with the recovery in the digital advertising industry.