Cybersecurity specialists Palo Alto Networks (PANW 0.34%) and FireEye (MNDT) enjoyed a terrific start to the year, but they have lost their momentum in recent months on the back of mixed earnings reports.

Palo Alto stock dropped after its fourth-quarter earnings guidance failed to pass muster, while FireEye has underwhelmed Wall Street each time it has reported its results this year. But investors looking for a cybersecurity play are in luck, as one of these companies is capable of staging a turnaround, which makes the recent stock drop an opportunity to buy more shares.

Person in a hoodie, face obscured, sitting in front of a laptop.

Image source: Getty Images.

The case for Palo Alto Networks

Palo Alto worried investors with its latest earnings report as earnings guidance was below expectations thanks to acquisition-related costs. But after removing the one-time impact of those costs and $0.02 per share attributed to the U.S.-China trade war tariffs, Palo Alto's earnings would have been right in line with what analysts were expecting.

Investors also took issue with the fact that Palo Alto's guidance for billings was lower than expectations. Investors need to take note of the fact that the company's contracts are now shorter in duration as clients shift to subscriptions, rather than buying licenses, and this is better for the company over the long term.

The good news is that these short-term issues have made Palo Alto Networks stock cheaper. It is trading at a price-to-sales ratio of 6.77, which is lower than its five-year average of 10.32, and also below the average multiple seen every year since 2016. This makes Palo Alto shares an attractive bet at current levels given that the company's top line and customer growth have been getting better on the back of its acquisition-driven strategy.

In fact, Palo Alto is one of the fastest-growing cybersecurity companies you can buy.

PANW Revenue (TTM) Chart

PANW Revenue (TTM) data by YCharts.

Looking ahead, Palo Alto can sustain this terrific rate of growth, as it is expanding its cybersecurity presence at a nice pace. The company's latest buys -- PureSec and Twistlock -- will expand its foothold in two more fast-growing areas.

PureSec plies its trade in the nascent serverless cybersecurity space that's expected to grow at an annual pace of almost 29%. Twistlock provides container security for cloud-native applications. This is another lucrative area that's expected to grow 33% annually through the next five years.

Such acquisitions in fast-growing verticals are the reason Palo Alto has been witnessing an increase in customer spending. Its top 25 customers spent 35% more on its products and services last quarter than in the year-ago period, which is an indication that they are buying multiple services from the company. Palo Alto's acquisitions should ensure that customers keep spending more money because they will have more options to choose from, while customers of the acquired companies can opt for its existing products.

FireEye isn't as attractive

FireEye has a habit of guiding lower than Wall Street's estimates quarter after quarter, and the trend continued the last time it released earnings. The company's Q2 revenue is expected to increase just 5.6% year over year, down from the 5.7% growth it recorded in Q1.

For the full year, FireEye expects revenue between $880 million and $890 million. At the midpoint of this guidance range, the company's revenue will grow less than 7%. The problem is that FireEye is looking to keep a handle on its costs, reducing spending on critical line items like research and development.

On the other hand, Palo Alto Networks is leaving no stone unturned in boosting its expenses to corner a bigger share of the cybersecurity opportunity. Palo Alto has spent over $1 billion on acquisitions in the past couple of years and its outlay on R&D has kept increasing.

PANW Research and Development Expense (TTM) Chart

PANW Research and Development Expense (TTM) data by YCharts.

Not surprisingly, Palo Alto enjoys a much better pace of growth than FireEye. What's more, despite its slower pace of growth, FireEye is more expensive than Palo Alto from a valuation perspective. It trades at nearly 48 times forward earnings estimates, while Palo Alto has a multiple of 31.6.

On the basis of growth potential and valuation, Palo Alto is a better bet when compared to FireEye.