The tech-heavy Nasdaq index recently made new highs, ushering in a new bull market. Even after a couple of weeks, the Invesco QQQ Trust, which tracks the Nasdaq index, is just 2.5% off its new high, having risen 63% since the start of 2023.

The gains are driven by investors clamoring for a piece of the artificial intelligence (AI) boom and by massive gains in stocks like Microsoft and Nvidia. QQQ Chart

QQQ data by YCharts.

With these stocks trading at nosebleed valuations and speculative names like SoundHound AI taking flight, many investors believe the market is overvalued, possibly even in a dreaded bubble. If you are wondering how to invest for the long term, one option is to focus on stocks producing tons of free cash flow (FCF), which is the cash left over after operating expenses and equipment have been paid for.

Companies making money this way build value for shareholders. The two below are excellent examples.

What does Arm Holdings do?

Arm Holdings (ARM 4.11%) is crucial to the semiconductor market but doesn't produce chips. Arm designs the architecture for chips; licenses them to other companies (like Nvidia, Amazon, Apple, and others), which customizes them for their needs, and gets a royalty payment for each unit sold. As of the third quarter of fiscal 2024, 280 billion products containing an Arm-designed chip have been sold. You probably use them daily since 99% of smartphones contain a central processing unit developed by Arm.

Arm's products are also used in the automotive industry, data centers, and the Internet of Things (IoT). The IoT market covers every other type of device that connects to the internet, like smart appliances, security cameras, and drones. The market is massive and growing.

Many electric, autonomous, or advanced driver-assist features (like lane control and collision warnings) use Arm chip designs.

Their third-quarter results excited Wall Street. Sales rose 14% year over year (YOY) to $824 million, while operating income fell from $244 million to $134 million, primarily due to increased stock-based compensation associated with the company going public. But cash flow, market share, and backlog were the standout figures.

Arm reported $251 million in FCF, meaning 30 cents of every dollar was converted to cash. And it said that its market share leaped to 51%, as shown below.

Arm market share

Source: Arm

This is huge because the company's royalties produce recurring sales. Lastly, Arm reported a remaining performance obligation (revenue to be recognized in future periods) of $2.4 billion, up 38% YOY.

The stock is difficult to value for two reasons: the lack of comparable companies and its short history since going public. The stock jumped after the earnings release but has retreated a bit since. Because it is tough to value, investors should consider dollar-cost averaging or buying the stock over several periods to take advantage of dips.

Is Palantir stock a good investment now?

Palantir Technologies (PLTR 3.73%) spent the last year proving naysayers wrong by becoming profitable and expanding its commercial footprint. The company is entrenched with many government clients (defense departments) but needs to gain traction elsewhere.

It has also been criticized for not being profitable. It silenced these doubts with four straight profitable quarters and by growing commercial (non-government) sales by 20% in fiscal 2023 and 32% in the fourth quarter. Its customer counts also rose significantly, as shown below.

Palantir customer growth

Source: Palantir.

Palantir's software helps customers analyze data from many sources to streamline operations and make better decisions. Its new Artificial Intelligence Platform (AIP) is designed for businesses and defense departments.

For example, a large distribution company can learn how a major weather event will affect a certain area. Users can determine through AIP which distribution centers are likely to be affected, the impact on backlogs and revenue, the best secondary routes, and the cost impacts. The distributor can use the results to make the best decisions for its customers and its bottom line.

As you can see below, Palantir's sales and cash flow are improving.

PLTR Revenue (TTM) Chart

PLTR revenue (TTM) data by YCharts. TTM = trailing 12 months.

Since most of its revenue is recurring, the increase in customer counts means the ramp-up is likely to continue. Palantir has built a fortresslike balance sheet with $3.7 billion in cash and investments and no long-term debt.

The stock trades at a price-to-sales ratio (P/S) of 24, which isn't cheap but is in line with other growing tech companies like CrowdStrike (25 P/S) and Cloudflare (24 P/S).

Arm Holdings and Palantir are profitable and cash-flow-positive companies that look like solid long-term investments and terrific stocks to buy on dips.