Shares of PubMatic (PUBM 1.75%) got a boost this week following a first-quarter earnings report that beat analyst estimates across the board. While the sell-side digital advertising platform only grew revenue slightly, there were plenty of positives for investors to latch onto. And with economic uncertainty impacting the advertising industry, PubMatic has one clear advantage that will help it weather the storm.

The benefit of avoiding the public cloud

PubMatic does one thing differently than many of its peers: The company builds, owns, and operates its own cloud infrastructure. It doesn't rely on Amazon Web Services or another major cloud platform.

This approach is capital intensive, and scaling is not quite so simple. But the upside is that PubMatic can relentlessly drive down unit costs by optimizing its infrastructure. The company handled 46.5 trillion ad impressions in the trailing-12-month period that ended in the first quarter, up 42% year over year. On a public cloud, costs would likely rise in lockstep with usage. But PubMatic was instead able to reduce its per-impression cost by 16% over the past year.

The downside for PubMatic is that this strategy can hurt accounting profits when growth slows. PubMatic must build out capacity ahead of expected demand, but if that demand weakens unexpectedly, the utilization rate of its infrastructure declines. The company's servers, networking equipment, and other gear are depreciated regardless.

While PubMatic's revenue rose 2% year over year in the first quarter to $55.4 million, the company posted a GAAP net loss of $5.9 million. That compares to a net profit of $4.8 million in the prior-year period. Even on an adjusted basis, net income fell from $8.1 million in the first quarter of 2022 to just $0.9 million in the first quarter of 2023. PubMatic's cost of revenue jumped by 33% year over year.

What PubMatic can do in this situation is scale back capital expenditures, both by further optimizing its infrastructure and by cutting back on expansion. The company expects its capital spending in 2023 to drop by around 60% from last year. Free cash flow was down in the first quarter, but thanks to the capex reduction, PubMatic expects to produce about the same amount of free cash flow this year as it did in 2022.

The ability to churn out cash despite tough industry conditions gives PubMatic a huge advantage.

A reasonably priced stock

Following the post-earnings rally, PubMatic is valued at about $800 million. The company generated free cash flow of $38.3 million in 2022, and that metric should be similar this year. That puts the price-to-free-cash-flow ratio at just about 21.

While PubMatic isn't growing much right now, the company's long-term growth story is still intact. PubMatic estimates that its market share was between 4% and 4.5% at the end of 2022, and it sees a path to get to around 20% in the long run. Add in growth in the digital ad market, particularly in areas like connected TV, and PubMatic could easily grow at a double-digit rate on average for many years to come.

PubMatic is holding its ground in a tough environment, and it's leveraging its efficient infrastructure to maximize free cash flow. Growth should reaccelerate once the storm passes, and investors are likely to be rewarded.