The stock-price charts of cyclical companies bring to mind many fitting metaphors: roller coasters, Ferris wheels, and my favorite from Peter Lynch, "polygraphs of liars and the maps of the Alps."

One minute you're up; the next you're down.

While cyclicals can be very profitable for investors, they can also cause the most amount of trouble. Why? Because they stand logic and reason on its head.

First, some clarification is in order. If we're going to think about investing in cyclical stocks, we need to know exactly what they are.

Definitions, please!
A cyclical company is one whose sales and profits tend to rise and fall in a regular fashion. From market boom to industry recession, these companies' fortunes have a regularity that one does not see in blue chips or small caps or other facets of the market. Precious metals, automobiles, paper, chemicals, airlines -- all of these could be considered cyclical industries that fall in and out of favor as the economy itself rises and falls.

So given that definition, Ford (NYSE:F) and General Motors (NYSE:GM), Phelps Dodge (NYSE:PD), Alcoa (NYSE:AA), International Paper (NYSE:IP), and Continental Airlines (NYSE:CAL) would fall under the rubric of "cyclical stock."

Look at their charts, and the colorful metaphors mentioned earlier spring to mind.

Now that we have an idea of what they are and where we can look for them, how do we value them?

That's where logic gets topsy-turvy.

The value school of investing
For any value investor schooled at the feet of Benjamin Graham, it's understood that when buying a stock, you want its price-to-earnings ratio -- the measure of a stock's price to its profits -- to be as low as possible. In his classic investing opus Security Analysis, Graham wanted stocks whose P/E ratio was less than 40% of the average P/E for all stocks over the past five years. For Graham and value investors, it was in the low price-to-earnings realm that you found your "margin of safety."

The trick with buying a cyclical stock, however, is to catch the wave just after it's crashed into the shore and the stock price has been annihilated by the end of the boom cycle. You want it when its P/E ratio is high.

Huh? Didn't we just say that low-P/E stocks had the greatest margin of safety? Well, with cyclicals, the reverse is true.

When the stock is riding high, the company is churning out record earnings, and all appears well. Earnings are so high, in fact, that its P/E ratio actually contracts. Remember the equation for P/Es:

P/E = Price/Earnings

When earnings get ahead of price, the ratio actually declines. A low P/E with a cyclical stock can actually point to the approach of a cataclysm. Conversely, a high P/E can signal that the nadir of the industry is at hand and good times are just ahead.

Mining for results
In 2004, Encore Wire (NASDAQ:WIRE) was an investment that held appeal. It was thought that the prospects for a recovery in copper prices should have a positive effect on the stock of this company, which held 25% of the copper-wire market in residential and commercial applications. Metals like steel, aluminum, and copper had all slid in price throughout 2003, and a rebound was hoped for in the following year. Encore's P/E at the start of the year had reached an all-time high; it was nearly four times higher than it had been just the year before.

With copper prices subsequently doubling and expectations of another 40% increase in 2005, Encore's share price also nearly doubled. I had bought Encore at around $12 a share in September of 2004, and by the end of 2005, shares changed hands at just less than $23 a share. By June of last year, its P/E had fallen to as low as a third of what it had been the quarter before, but shares of Encore were trading at $32 a stub. While that was off its all-time high of $44 a share, I sold my stake and watched as the stock subsequently tumbled all the way back to $21, where it stands today.

Ratio-nal thinking
The P/E ratio is just one piece of the puzzle, but with cyclicals, it can be a very telling one. When the clouds seem darkest overhead for an industry -- and today the headlines for the homebuilders are dark indeed -- that is often when the tide turns. When you're investing in cyclical stocks, that's the time to yell, "Surf's up!"

At Motley Fool Inside Value, we consider all manner of companies ready to turn the corner of profitability. The team analyzes cyclicals, turnarounds, blue chips, and more to see which have the best prospects for growth. A 30-day guest pass gives you a risk-free look at those that have made the grade.

Fool contributor Rich Duprey owns shares of Ford, but no other stocks mentioned in this article. You can see his holdings here. The Motley Fool has a disclosure policy.