Artificial intelligence (AI) is dominating the conversation in tech stocks this year, but other secular trends are just as important. Some trends last, others don't. So it's important to distinguish between a legitimate secular movement with the potential for life-changing long-term returns and fads that fade quickly and can lose investors a boatload of money. 

For instance, a recent study reports that 95% of NFTs (non-fungible tokens that represent ownership, often an image) are now completely worthless. On the other side, the cloud infrastructure market is generating more than $245 billion annually, global advertising generates $830 billion, and AI's $200 billion market this year is forecast to reach $1.8 trillion by the end of the decade. Whether you have $1,000 or $100,000 to invest, these trends are fertile soil for long-term investments. Let's look at two companies at the forefront.

The Trade Desk

How we consume media is changing, and advertisers have to reach consumers where they are. Connected television (CTV, any TV accessed with the internet), online video, mobile, and websites are a few examples. Advertisers also need to reach their target audiences efficiently. As I like to say, it doesn't make sense to advertise pet insurance to non-pet owners. The Trade Desk's (TTD 1.67%) demand-side platform (DSP) provides the solution with programmatic advertising.

Programmatic advertising happens when a publisher (like a streaming television provider or online publisher) sends a bid request for ad space. Then, a DSP like The Trade Desk will bid on the space in real time on behalf of its clients. It all happens in a fraction of a second. The Trade Desk offers customers a user-friendly interface, first-party data for targeting the desired audience, and tools to track campaign performance.

The company's CTV presence is its bread and butter, and it is growing much faster than the industry as a whole. This means that The Trade Desk is gaining market share. Revenue rose precipitously from $661 million in 2019 to $1.7 billion in the trailing 12 months. Its free cash flow, the money left over after all expenses and purchases of property and equipment, also reached a record $530 million, as depicted below.

TTD Revenue (TTM) Chart

TTD Revenue (TTM) data by YCharts

These results allow the company to grow with no long-term debt and $1.4 billion of cash and investments to invest in growth. The Trade Desk is profitable on a generally accepted accounting principles (GAAP) basis, although not significantly so, as it is in a growth phase. Still, this bodes well for the future. 

The stock trades at 21 times sales, slightly higher than fellow high-growth software-as-a-service (SaaS) companies like Cloudflare (17 times) and Snowflake (20 times). However, The Trade Desk is the only one of the three that is currently profitable, so it has earned a slight premium. The key to the stock price continuing to appreciate will be increasing sales for many years. The CTV ad market alone is expected to grow 64% to $41 billion by 2027, and The Trade Desk has a proven track record of growth.

Amazon

You've heard of buy one, get one (BOGO), but Amazon (AMZN 3.43%) stock offers a buy one, get all three (BOGAT). Okay, I just made that last acronym up, but Amazon stockholders do get exposure to AI, digital advertising, and the cloud in one stock. Amazon has been busy diversifying its revenue streams into desirable industries like these for several years, and it now makes more revenue from its various service businesses than from retail sales. Take a look at the pie chart below.

Amazon sales mix

Data source: Amazon. Chart by author.

As recently as 2019, 56% of Amazon's total sales were retail. This change is enormous because retail sales have razor-thin profit margins, whereas services are generally much higher margin. Amazon Web Services (AWS) had an operating margin of 24% last quarter, for example. AWS is the world's leading cloud platform with 32% of the total market, ahead of Microsoft Azure at 22%. Many people know that this business is critical to Amazon but may not know that Amazon is also a force in digital advertising.

Like The Trade Desk, Amazon has a DSP, and advertisers can purchase ads that stream on Amazon Prime and elsewhere. However, Amazon also allows advertisers to reach consumers on Amazon.com who are literally ready to buy. You have probably seen sponsored products and sponsored brands if you do any Amazon shopping. These ads are incredibly effective because every eyeball reached is actively looking for that advertiser's product. This makes these ads well worth the money.

Because of this, Amazon's digital advertising revenue nearly doubled from 2020 to 2022, from $19.8 billion to $37.7 billion, and reached $41.3 billion over the last 12 months.

AI is the next frontier for Amazon, although it uses AI and machine learning already to enhance logistics and optimize ads. But now, it is tackling generative AI (programs like chatbots, virtual assistants, and content creators) by offering foundational models that customers can use to create programs that meet their specific needs. But this may not be the biggest factor in Amazon's AI potential.

AI software requires oodles of data and data processing to work properly, and AWS operates much like a utility; customers pay for the data they use. The expected AI boom, which will take an industry from $200 billion this year to $1.8 trillion by 2030, will have data needs that are almost unfathomable.

Amazon stock has recovered this year, up 50%, but is still 32% off its all-time high. Its price-to-sales ratio is still low, at levels not seen consistently since before 2016, as shown below.

AMZN PS Ratio Chart

AMZN PS Ratio data by YCharts

The stock deserves serious consideration from long-term investors at this level. After all, investing in the AI, digital advertising, and cloud movements allows investors a piece of three massive, growing markets.