In a testimony to the benefit of value investing, Dover Corporation (DOV -0.97%) is up nearly 14% year to date despite weakening end market conditions in its oil-and-gas-focused sales and operational inefficiencies in its retail refrigeration segment. As you can see below, Dover, along with other oil-and-gas-heavy industrials like Emerson Electric (EMR -1.51%), started the year at a generous valuation. However, now that the stock and valuation have risen, is it time to cash in gains?

DOV EV to EBITDA (TTM) Chart

DOV EV to EBITDA (TTM) data by YCharts.

Dover Corporation's difficult year

Dover started the year as a compelling value proposition, and the valuation was generous enough to sustain a guidance cut in the first quarter. But the "fun" didn't stop there. Guidance was also cut in the second and third quarters as well.

The upshot of all this is a company that started the year expecting organic revenue to decline between 4% and 1% but is now expecting a decline of 8% to 7%. Moreover, EPS guidance started the year at $3.85 to $4.05, only to be reduced to $3 to $3.05 at the third-quarter results presentation.

Essentially, three things went wrong:

  • Ongoing declines in oil-and-gas-based capital spending continued to cause lower guidance for the energy segment.
  • Similarly, the fluids segment (particularly pumps) got hit by weaker oil and gas spending.
  • Production inefficiencies created a $6 million hit to earnings in the refrigeration and food segment in the third quarter -- for reference, the segment's earnings was $64 million in the quarter.

The relative importance of the segments and the dramatic decline in energy segment earnings can be seen below.

Data source: Dover Corporation presentations. Chart by author. Data in millions of USD. TTM = trailing 12 months. 

Current trading

It's difficult to be too critical of Dover for deteriorating oil and gas markets -- after all, well-regarded management teams such as that of Emerson Electric have also been too optimistic with regard to the oil and gas outlook this year.

On the other hand, Dover's guidance has clearly been overly optimistic, and the unwelcome production problems in refrigeration -- due to what CEO Bob Livingston described as "complexity that we've added into the organization with many new customers and smaller product lots" -- have disappointed investors. Moreover, a look at organic bookings growth shows that underlying conditions actually got worse in the company's fluids segment in the third quarter.

Data source: Dover Corporation presentations. Chart by author.

So is it time to take profits and sell the stock?

Three reasons to be positive

First, the swing factor in Dover's earnings really is oil and gas capital spending, and as you can see below, oil prices have improved and the oil rig count -- traditionally a good indicator of Dover's oil-and-gas-based revenue -- has also improved. In fact, analyst estimates have Dover's EPS improving by 20% next year.

WTI Crude Oil Spot Price Chart

WTI Crude Oil Spot Price data by YCharts.

Second, the production difficulties in refrigeration could prove temporary. On the earnings call Livingston claimed that current guidance "does not assume any further improvements in our production variances beyond what we're running at in September," so it may prove conservative.

Third, while organic bookings in fluids (see chart above) declined, Dover has been acquiring businesses, and as you can see below, its fluids bookings were up 16% on a reported basis in the third quarter. If oil and gas spending improves, there is also significant upside potential.

DATA SOURCE: DOVER CORPORATION PRESENTATIONS. CHART BY AUTHOR.

In fact, reported bookings look like they are about to turn positive.

Data source: Dover Corporation presentations. Chart by author.

What to do with Dover Corporation stock?

On balance, I think the stock is worth holding on to. The company remains a strong free cash flow generator -- by my calculations it's on target for $730 million, or 5.4% of its enterprise value (market cap plus net debt) in 2016. It's nowhere near as attractive a valuation as it was at the start of the year, but it looks like a good value for some exposure to the potential upside of higher oil prices.

Provided conditions don't worsen in oil and gas and management can get a handle on the production problems in refrigeration, Dover still looks like a reasonable value.