If you buy a stock when its price-earnings ratio is higher than its projected earnings growth rate for the year, then you're paying a premium for the stock. Yet many investors are willing to pay that premium if a company has a strong record of robust sales and earnings growth, or if it resides in a high-growth sector.

Image source: Getty Images.

One such company is CyberArk (CYBR 0.75%), an Israeli cybersecurity firm that provides PAM (privileged account management) solutions that shield companies from insider attacks by hackers and disgruntled employees. Its stock currently trades at around $50 as of this writing, which translates to a trailing P/E of 65 and a forward P/E of 39.

Those figures are pretty high relative to its projected earnings growth of 7% this year and 20% next year. Those multiples are also much higher than the average P/E of 29 for the business software and services industry. Let's see why investors are willing to pay a premium for CyberArk, and whether or not the stock is still worth buying at current prices.

A profitable company in a mostly unprofitable sector

Unlike many of its cybersecurity peers, CyberArk is profitable by both non-GAAP and GAAP metrics. The company's non-GAAP net income rose 123% annually to $35.3 million last year, while its GAAP net income improved 158% to $25.8 million.

It accomplishes this with more disciplined spending, especially in regards to stock-based compensation expenses, which are excluded from non-GAAP earnings. During the first half of 2016, CyberArk's stock-based compensation (SBC) expenses only claimed less than 8% of its revenues.

By comparison, FireEye's (MNDT) SBC expenses gobbled up about 35% of its sales during the first half, while Palo Alto Networks' (PANW 0.56%) claimed about 30% of its sales in fiscal 2016. Neither FireEye nor Palo Alto is profitable on a GAAP basis.

CyberArk's non-GAAP earnings growth is expected to slow to the single digits this year due to R&D for new products and an aggressive expansion of its sales team. That's where FireEye, Palo Alto, and other cybersecurity firms ran into trouble, but CyberArk's record of disciplined spending will likely keep it profitable.

A "best in breed" player in an overlooked niche

Most cyberattacks occur from external sources, which prompted many cybersecurity firms and larger IT companies to develop perimeter defenses like firewalls and threat detection systems. Fewer companies focused on countering internal threats with PAM solutions, enabling CyberArk to quietly become the biggest player in the niche market.

CyberArk's customer list includes 40% of the Fortune 100 and 17 of the biggest banks in the world, and it is the only PAM solution certified by the U.S. Department of Defense. That "best in breed" reputation enabled it to secure PAM partnerships with large IT players like HPE and IBM. It also gave CyberArk the market clout to launch the C3 Alliance, a consortium of companies that integrate its PAM solutions into their own security platforms.

Those tailwinds are generating robust sales growth for CyberArk. Its sales rose 56% in 2015, and analysts are anticipating 32% sales growth this year. However, that estimate could actually be conservative if data breaches continue surging and CyberArk's sales force expansion pays off.

Strong buyout potential

Worldwide cybersecurity spending could hit $1 trillion between 2017 and 2021 according to Cybersecurity Ventures. Meanwhile, the cybersecurity sector remains ripe for consolidation, with many companies like CyberArk dominating specific niche markets.

Check Point Software (CHKP -0.28%) was reportedly in talks to acquire CyberArk earlier this year, but the rumors eventually faded. Nonetheless, CyberArk could still be a compelling acquisition target for perimeter players or bigger IT companies looking to dominate the PAM market with a single purchase. CyberArk's valuations look a bit lofty, but its enterprise value of $1.2 billion and its clean balance sheet still make it an attractive takeover target.

Should you pay a premium for CyberArk?

CyberArk is a volatile stock which isn't for conservative investors. But if you believe that data breaches will continue rising, I strongly believe that CyberArk is one of the best plays in the sector. Its robust sales growth, consistent GAAP profitability, dominance of the PAM market, and attractiveness as a buyout target all indicate that it might be worth paying a premium for.