What happened

Cybersecurity software specialist FireEye (MNDT) gained 24% through the first half 2017, according to data provided by S&P Global Market Intelligence.

The rally helped longer-term shareholders recover a bit of lost ground following a brutal 2016 that saw the stock tumble by over 40%.

FEYE Chart

FEYE data by YCharts

So what

FireEye's outperformance so far this year can be tied to improving operating trends. The company in early May announced first-quarter results that beat management's expectations across the key metrics of revenue, billings growth, and operating income.

An illustration of a lock in cyber space.

Image source: Getty Images.

The company remains deeply in the red, but at least the important numbers are headed in the right direction. Revenue rose 3% in the first quarter, instead of declining by 1% as executives had predicted. Gross profit margin improved  from 70% of sales to 73%, and aggressive cost-cutting helped the company achieve a 7% loss on operating margin, compared to a 44% loss in the year-ago period. "We made continued progress on our path to profitability in the first quarter, improving operational efficiency while managing transitions on multiple fronts," CEO Kevin Mandia said in a press release.

Now what

Mandia and his team are forecasting that sales gains will accelerate in the second half as FireEye's customer base grows and it markets expanded offerings like the just-released Helix security platform. The company is aiming to achieve positive non-GAAP operating margin by the fourth quarter while also generating -- rather than burning through -- cash. Investors are growing more optimistic that FireEye will hit those goals without sacrificing long-term growth by slicing too much from its marketing and research and development budgets.