The big market news as it relates to the cybersecurity competitors is the more than 20% beating Palo Alto Networks (NYSE:PANW) stock is taking following its disappointing fiscal 2017 second-quarter earnings report. Not surprisingly, word of its poor quarter has also negatively impacted Fortinet (NASDAQ:FTNT) shares, though not nearly to the same extent.

But is Fortinet now the slam dunk better buy -- particularly after it posted what amounts to polar opposite earnings results on Feb. 2 -- or does Palo Alto's recent stock decline make it the better long-term value? An argument could be made for both scenarios, but for long-term investors the choice is clear.

Group of business people analyzing charts

Which stock is the better buy? Image source: Getty Images.

The case for Palo Alto

First, the bad news. Palo Alto CEO Mark McLaughlin tried to sugarcoat last quarter's dismal results saying "While  fiscal second quarter revenue of $423 million was yet another record for the company, we were disappointed that we came in below top-line expectations." Unfortunately, that wasn't quite true. Palo Alto didn't report revenue "below top-line expectations" based on the prior quarter's guidance.

Palo Alto forecast revenue of between $426 million to $432 million, equal to a 27% to 29% year-over-year improvement. The recent quarter's $423 million was a 26% increase from a year-ago. To Palo Alto's credit, earnings per share (excluding one-time items)  of $0.63 were at the high-end of its forecast, and slightly above the Street's expectations of $0.62.

Higher spending was once again a factor pushing Palo Alto to a net loss -- in this case,  $60.6 million including expenses, equal to $0.67 a share, compared to last year's $57.3 million shortfall ($0.66 per share). The upside of Palo Alto's 25% increase in operating expenses is that's a slight easing compared to the hikes of prior quarters. Going forward, McLaughlin has to clean up the "execution challenges" he cited as reasons for Palo Alto's tough quarter.

If the spending spree continues to slow -- though don't expect that to happen this period following its just-announced $105 million acquisition of machine learning startup LightCyber -- and if it can execute efficiently, risk tolerant investors could make an argument that Palo Alto's sell-off is an opportunity. The decision to double its stock buyback initiative to $1 billion is also a plus, particularly at current levels.

An example of Fortinet's data security interface.

Data security interface. Image source: Fortinet.

The case for Fortinet

In contrast to Palo Alto, Fortinet shareholders are enjoying a banner 2017. Its shares are up 22% year to date due to last quarter's stellar results, which CEO Ken Xie attributed to its "technology advantage, combined with improvements in sales execution." Revenue  in the fourth quarter climbed 22% to $362.8 million, and rose 26% to $1.28 billion for the year.

Fortinet ended 2016 above its own  expectations and handily beat the pundits' consensus revenue estimates of $344 million. Expectations for the current  quarter of $334.8 million would be a solid 18% year-over-year improvement. Unlike Palo Alto, Fortinet has a handle on spending, as it demonstrated again last quarter.

While revenue climbed 22%, Fortinet's operating expenses increased just 12% to $226.7 million, half Palo Alto's spending hike. The result of its combined revenue growth and overhead management was a whopping 67% jump in fourth-quarter EPS to $0.30, excluding one-time items. Including all expenses, Fortinet more than tripled its EPS from 2015's $0.05 to $0.18.

Which is the better buy?

The aforementioned value investors who are considering Palo Alto after its selloff should be aware that based on current guidance for revenues between $406 million and $416 million -- equal to 17% to 20% growth -- the company has a long road ahead. Day traders and the like may push Palo Alto shares up in the coming days and weeks, but those types of price spikes aren't sustainable.

For investors with an eye toward the long term, the better buy is Fortinet by a wide margin. Palo Alto's recent quarter was an accident waiting to happen. Fortinet hasn't grown its top line by leaps and bounds as its peer has, but Xie's slightly more conservative approach has laid a solid foundation of growth for years to come.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.