Demand for cybersecurity services is rising due to a surge in data breaches worldwide. The Identify Theft Resource Center reports that the number of personal records exposed in data breaches nearly doubled to 169 million last year, while research firm Markets and Markets estimates that the global cybersecurity market will grow from $106.3 billion in 2015 to $170.2 billion by 2020.

Image source: Pixabay.

But despite that growth potential, many cybersecurity stocks withered over the past year due to concerns about profitability, valuations, and competition from larger tech firms. Two such stocks are Palo Alto Networks (NYSE: PANW) and FireEye (NASDAQ: FEYE), which have fallen 14% and 18% respectively in 2016. Palo Alto provides a firewall, while FireEye offers threat prevention solutions to intercept attacks before they hit. Let's compare these two companies' fundamentals.

Top line comparison
Palo Alto and FireEye both have strong records of double-digit sales growth. Palo Alto's revenue rose 54% annually to $335 million last quarter, compared to 55% growth in the previous quarter and 54% growth a year earlier. Billings rose 62% annually to $495 million, outpacing revenue growth and boosting its free cash flow 93% to $136 million. Total deferred revenue rose 73% annually to $929 million, indicating that near-term demand remains robust.

FireEye's revenue rose 29% annually to $185 million last quarter, down sharply from 45% growth in the previous quarter and 150% growth a year earlier. Billings rose 21% to $257 million, while free cash flow rose from negative $0.3 million a year earlier to $9.4 million. Total deferred revenue rose 49% annually to $527 million at the end of the fiscal year.

These figures indicate that Palo Alto has much stronger sales growth and more upcoming demand than FireEye. Analysts expect that trend to continue in the near term -- Palo Alto's revenue is expected to rise 47% this fiscal year, while FireEye's revenue is expected to improve 33%. However, Palo Alto's EV/Sales ratio of 11.3 is much higher than FireEye's ratio of 3.9, indicating that its stock is pricier relative to its trailing sales growth.

Bottom line comparison
Neither Palo Alto nor FireEye is profitable on a GAAP basis. But on a non-GAAP basis, Palo Alto's net income rose 115% annually to $36.3 million last quarter. The difference between that profit and its GAAP net loss of $62.5 million can mainly be attributed to $106.9 million in stock-based compensation -- which represents a 76% jump from the prior year quarter.

FireEye, however, is unprofitable on a non-GAAP basis. On that basis, its net loss narrowed by nearly $4 million year-over-year to $52.5 million. A big chunk of that loss came from operating expenses, which rose 20% annually to $245.1 million. On a GAAP basis, its net loss widened from $105.7 million a year ago to $136.1 million. Like Palo Alto, the biggest adjustment was for stock-based compensation, which rose 28% to $57.8 million.

Palo Alto easily beats FireEye in bottom line comparisons because it has positive non-GAAP earnings growth, while it's unclear when FireEye's will stem its losses.

Headwinds and catalysts
Looking ahead, both companies face the threat of bigger rivals like Cisco (CSCO 0.67%) marginalizing their services with bundled security offerings. Cisco expanded its firewall and threat prevention services by buying Sourcefire, ThreatGRID, and other security firms, and its security portfolio generated $1.7 billion in sales in fiscal 2015.

However, both Palo Alto and FireEye have "best in breed" reputations in next-gen firewalls and threat prevention solutions, respectively. Palo Alto's firewalls are approved by a large number of agencies worldwide, including the U.S. Department of Defense. FireEye was the first cybersecurity company to be certified by the U.S. Department of Homeland Security last April. FireEye is also part of the CyberArk (CYBR 0.47%)-led C3 alliance, which integrates CyberArk's privileged account protection solutions into its own threat prevention ones.

FireEye's real-time threat map. Image source: FireEye.

Since companies are unlikely to choose unproven, competing bundles to save a few dollars while exposing their records to hackers, there's been speculation that larger tech companies like Cisco could buy smaller players like Palo Alto and FireEye to consolidate the market. If that happens, FireEye, which has an enterprise value of $2.4 billion, could be considered a cheaper buy than Palo Alto's EV of $13 billion.

The winner: Palo Alto Networks
FireEye currently trades at a discount to its IPO price of $20 for two clear reasons -- its sales growth is slowing and its bottom line remains deep in the red. I think FireEye could still be a lucrative takeover target with its low EV/Sales ratio, but that's not a good enough reason to buy the stock. Therefore, investors interested in adding a cybersecurity stock to their portfolios should consider buying Palo Alto instead.