Over the past couple of years, investors have been treated to a somewhat rare sight -- real signs of life in commodities. Commodity companies, long the walking dead of Wall Street, saw their stock prices go up nicely through 2003 and into 2004. Given that most commodities still have rosy demand into the future, it's time to look at some ways to profit from commodities.

Fortunately, there are numerous ways to profit from commodity moves that don't involve digging for lead in your back yard or challenging fate in the commodity futures markets. Look past the old ways and discover a larger world of interesting commodity-related companies. Forward-thinking Fools might even want to expand their notion of "commodity" and look in the direction of new non-traditional commodities like water -- an essential commodity that will take on increasing economic significance over time.

The traditional approach, with a few twists
There's nothing wrong with looking to traditional commodity companies for investment opportunities. In this case, it's important to understand the current commodity cycle, the company's cost structure, and its product offerings.

Commodity moves generally follow a common pattern: oversupply, production contraction, shortage, production expansion, and then oversupply again. From end to end, this cycle generally takes about 15 to 20 years, but there are frequently two-year mini-cycles along the way. Before investing, take a few moments to research this fundamental demand-and-supply situation -- the CRB Commodity Yearbook is an excellent source for this -- and try to establish just where the commodity in question fits into the cycle.

Cost structure is also absolutely vital to a successful long-term commodity investment. A boom in the price of finished commodities (steel, paper, etc.) only benefits companies to the extent that the operating efficiencies and the cost of raw materials allow. Simply put, companies that can produce a commodity for less than the competition will usually reap the most.

Fortunately, there are several examples of quality commodity companies. The Korean steelmaker POSCO (NYSE:PKX) is one of the best operators around. Elsewhere, you have UPM-Kymmene Oyj (NYSE:UPM) in paper, Mueller Industries (NYSE:MLI) in metal pipes, PetroChina (NYSE:PTR) and PetroKazakhstan in oil, and Ultra Petroleum (AMEX:UPL) in natural gas. All of these companies are low-cost producers in industries where production costs define the long-term winners.

Even though all commodities are supposed to be alike, innovation can be surprisingly important, even in businesses as dull as steel, chemicals, or coal. Innovation is what allowed DuPont to morph from a gunpowder maker to a plastics maker, and innovation led Nucor to find a better (or at least very different) way of making steel. Other innovators find new uses for commodities -- like Headwaters (NASDAQ:HDWR) and its methods for converting coal into synfuel and coal byproducts into construction materials.

Drafting: It's not just for NASCAR anymore
Watch even one NASCAR race on TV, and you're sure to hear about drafting -- a phenomenon where a car can sneak in behind a faster car and get pulled along for the ride. This also works in commodities. It is often the case that strong demand for one commodity will "pull" demand for other products that are essential to some part of the production process.

For instance, when grain prices go up, farmers usually respond by planting more the next year. While this tends to lower the price for grain, it's a boon to fertilizer makers like Potash or Agrium. Of course, you can have it both ways and just buy Bunge, a company involved in both businesses. There are many other "ride along" opportunities like aluminum and caustic soda or paper and titanium dioxide. All it takes is just a few hours of research to find a whole family tree of opportunities that branch from a singular idea.

Transports: Gotta ship it before you use it
Another way of investing indirectly in commodities is to invest in the companies that haul the stuff around the world. When the markets for commodity products start to move, so too do the markets for transporting those goods.

While plenty of oil moves through pipelines, a lot also goes into tanker ships. Tanker stocks had a strong run in 2003 and 2004 as rising petrochemical prices lifted their day rates, but the sector has come down a bit as lower crude prices and newly built ships have eased some of the demand pressures. Nevertheless, investors who believe oil prices are in for another rise could look at TsakosEnergy, TeekayShipping, or TOP Tankers.

While oil hits the high seas, metal ores, fibers, and grains often move over rail. As mentioned in an earlier piece, Genesee & Wyoming (NYSE:GWR) has done very well for itself by shipping little else but commodities, as has a much larger railroad company, Canadian National Railway.

One final way to find opportunities is to do what many purchasing managers do when commodity prices go up -- look for substitutes. For instance, when sugar becomes more expensive, food makers switch to high-fructose corn syrup. If a company hits on a truly attractive substitute, the rewards can be amazing.

The 1950s and '60s saw one of the great substitution waves of all time: the substitution of plastics for metals, woods, glasses, and many other goods. While it may be hard to imagine today, companies like Dow Chemicals and DuPont were the growth stocks that Dell and Starbucks were in the 1990s, and they did it largely through substitution.

Many modern-day companies hope to catalyze the same sort of cycle. Carbon fiber makers like Cytec offer customers the option to replace metal in their products with lighter carbon fiber, while Headwaters offers building materials that are stronger than concrete but more environmentally sustainable.

Fuel cells are another good example of both the promise and pitfalls of substitution. BallardPower is a leader in the development of fuel-cell power systems for automobiles, but unless somebody is willing to spend $20 billion to $30 billion to retrofit fuel stations for pressurized hydrogen, those cars aren't going to go very far. By the same token, an entrepreneur who can find an affordable, proprietary way to produce and deliver hydrogen for fuel cells could be the Rockefeller of the 21st century.

My bottom line
Commodities have always been an integral part of the economy and, in one form or another, always will be. Even when we are building resorts on the moon, there will be still be a need for the "stuff" that makes up the rockets and the buildings. Consequently, Fools should look beyond the beaten path of simply piling into any old gold stock just because gold is going up or any old paper stock just because pulp prices are soaring. Instead, look for the quality companies doing something just a little bit different -- whether that's simply being the low-cost producer, producing an innovative twist on an old commodity, or developing an entirely new substitute. That little edge can make all the difference down the road.

Fool contributor Stephen Simpson, CFA, owns shares of Headwaters and PetroChina. The Motley Fool has a disclosure policy.