Image source: Red Hat

Red Hat (RHT) reported fourth-quarter results on Thursday night. The next day Red Hat shares plunged 7% lower.

I'm convinced that the market reaction here is incorrect and that Red Hat shares are selling at a temporary discount right now.

Here's why.

The news
First, the fourth quarter was very good. Revenue jumped 15% year over year to $400 million, edging past Wall Street's estimates. Non-GAAP earnings rose 8% to $0.39 per share, also ahead of analysts' targets at $0.37 per share.

The results were also at the top end of Red Hat's own guidance, firmly above the midpoint of management's guidance ranges. Earnings exceeded even the top of those official guidance ranges. And that's despite a 2% headwind from currency exchange trends in the quarter.

Moreover, guidance for the first quarter of fiscal year 2015 (currently under way) sat just above the current Street views. Nothing wrong there.

If fourth-quarter results looked so good, why are Red Hat's shares plunging?

Because Red Hat is not following the market's unwritten rules. Operating margins may shrink this year as the company invests heavily in a massive business opportunity.

The backstory
If you've been following Red Hat for a while, you may have heard of the company's tacit agreement to keep operating margins on the rise. Here's what CEO Jim Whitehurst told me in 2011:

We have sort of reached a negotiated settlement with Wall Street. In general, analysts like to see margin improvement so we've committed to 100 basis points of operating margin improvement a year, and then we invest the rest in the business. So that's exactly what we do.

That commitment sort of ended in 2012 when Red Hat went on a shopping spree to bulk up its presence in several key markets. Starting with cloud-storage specialist Gluster in late 2012, Red Hat made four plug-in acquisitions over the next year in fields like cloud management, enterprise messaging, and business process management.

All of these new assets were integrated into Red Hat's sales, R&D, and management structures. Many of their products got rolled into the Red Hat Enterprise Linux and Fedora platforms. In particular, Gluster motivated a boost to Red Hat's sales efforts, with staff and budget increases just to strike on this product while the iron was hot.

The effort paid off in spades. Red Hat's margins may not have stayed rock-solid in this era, but net income has soared 24% higher since the Gluster buyout on 42% higher sales.

RHT Revenue (TTM) Chart

RHT Revenue (TTM) data by YCharts

What's old is new again
And now it's happening again.

Red Hat set its sights on lower operating margins in the new fiscal year. This much-watched margin had been recovering from the 2011-2012 shopping spree, but don't expect it to rise any further.

Instead, non-GAAP operating margins should drop to roughly 21% in the first quarter and 23.5% for the full year. That's down from 23.9% in last year's first quarter and from 24.5% in the just-reported fiscal year.

That's because Red Hat is investing hard in the OpenStack cloud structure. This cloud management framework was started by Rackspace Hosting (RAX), which still plays an important role in OpenStack's backing and management. But Red Hat Enterprise Linux and its tools have taken center stage in a big way, presenting the Linux veteran with perhaps a larger business opportunity than Rackspace itself.

CFO Charlie Peters said as much in the analyst call:

We believe we have a significant growth opportunity ahead of us in some of these new technologies. We made a firm decision in our fourth quarter that is exactly what we want to do. We want to invest, and we think we have a reasonable balance of growth and profit. But there are times in the market when you have to take -- go for it, and this is definitely one of them.

Red Hat CEO Jim Whitehurst likes what he sees ahead -- even if Wall Street disagrees. Image source: Red Hat

CEO Jim Whitehurst explained Red Hat's excitement over OpenStack further. "There's substantially more interest in OpenStack, frankly, than there's been in really any product since Linux," he said in that call. "There's a huge need for cloud infrastructure, and there are not a lot of alternatives out there." And this growth opportunity is in "a different zip code than Red Hat Enterprise Virtualization or Gluster."

In a direct call with yours truly later that night, Whitehurst dove deeper into how the early stages of a massive growth effort can put pressure on profit margins -- especially in a subscription-based business model like Red Hat's.

We have a really rare opportunity around cloud, especially in OpenStack and OpenShift, that we need to drive into now. Unfortunately it's just the nature of the beast in a subscription model: Your revenues lag behind your activity because of subscriptions, you sell the deals and then recognize revenue over time. And so, it's just gonna be natural that you have to invest while waiting for that revenue. And apparently, analysts didn't seem real thrilled with that.

So Red Hat is adding engineers, consultants, salespeople, and other staff to support this tremendous growth driver. OpenStack may be Rackspace's baby, but Red Hat is taking it to the next level.

Margins may suffer in the short term, but the long-term business opportunity is undeniable.

RHT Revenue (TTM) Chart

RHT Revenue (TTM) data by YCharts

After Friday's price drop, Red Hat shares have gained just 14% over the last three years while sales soared more than 40%, as we saw above. As a result, Red Hat shares are trading at a very reasonable P/E ratio -- historically speaking.

And with this kind of growth story still ahead of Red Hat, this price drop looks like a serious buying window. Investors are running scared of a change that actually points to fantastic long-term growth. I'm kind of tempted to start a position myself, once our Foolish disclosure rules allow me to trade the stock. We have rules about this kind of thing to prevent pump-and-dump shenanigans, you know.

Stay tuned.