More positive earnings reports from large companies helped drive small gains for the major stock indices on Thursday, although some companies missed expectations. Progress on a Brexit deal between the U.K. and the European Union might have helped the cause, although that deal is still very much up in the air.

Index Change at 2 p.m. EDT
Dow Jones Industrial Average (DJINDICES:^DJI) 0.10%
S&P 500 (SNPINDEX:^GSPC) 0.34%
Nasdaq Composite (NASDAQINDEX:^IXIC) 0.40%

Data source: Yahoo! Finance.

One company that failed to join the positive earnings parade was International Business Machines (NYSE:IBM). IBM reported a larger-than-expected revenue decline, even with some added revenue from its acquisition of Red Hat. Meanwhile, Pool Corp. (NASDAQ:POOL) easily beat expectations with double-digit revenue growth.

Lower revenue for IBM

IBM closed on its $34 billion acquisition of open-source software company Red Hat in July, setting the stage for improved growth thanks to ample cross-selling opportunities. But there was no growth in the third quarter for IBM. Revenue slumped 3.9%, missing analyst estimates by $190 million. The stock was down 5.6% at 2 p.m. EDT.

To be fair, the headline number doesn't tell the whole story. IBM was only able to recognize a small portion of Red Hat's revenue during the third quarter due to the accounting treatment of the acquisition. On a comparable basis, Red Hat's revenue was up 19%.

The z15 mainframe system.

The z15 mainframe system. Image source: IBM.

The mainframe product cycle also acted as a headwind. IBM announced its latest z15 mainframe system last month, and it began shipping to customers in the final week of the quarter. Mainframe sales tumbled 20% in the third quarter, a standard occurrence in the late stages of a mainframe cycle. Sales should rebound in the fourth quarter.

Currency and divestitures took a bite out of sales as well. Adjusted for both those items but including the partial Red Hat revenue, IBM's sales would have slumped by just 0.6%.

IBM will be able to recognize more and more of Red Hat's revenue in the coming quarters, which will almost certainly be enough to drive revenue growth in 2020. The z15 mainframe will also help the cause, although currency will likely remain a headwind. Next year will look better for IBM, but the company has a lot of work to do to convince investors that its strategy will work in the long run.

A solid quarter for Pool Corp.

The swimming pool business is doing just fine, judging from Pool Corp.'s third-quarter results. Sales were up 11% to $898.5 million, beating the average analyst estimate by nearly $15 million. Strong sales of construction materials and products used for the repair and replacement of in-ground pools contributed to that growth, as did an extra selling day compared to the prior-year period.

Shares of Pool Corp. were up 9.9% at 2 p.m. EDT. The stock has soared over the past five years and is now up nearly 280%.

Pool Corp.'s bottom line benefited from higher sales and disciplined cost management. Operating expenses rose by 8%, a few percentage points slower than revenue growth, helping to drive a 17% rise in earnings per share. EPS came in at $1.95, beating analyst expectations by $0.17.

A strong third quarter allowed Pool Corp. to boost its earnings guidance for the year. The company now expects EPS between $6.20 and $6.40, up from a previous range of $6.09 to $6.34.

While Pool Corp. is enjoying record results at the moment, the pool construction business almost certainly won't hold up during a recession. The good times won't last forever.