The past 12 months were the year of the oil bubble. Here's how you can still get in on the action, no matter what crude prices do next.

(FORTUNE Magazine) – We know what you're thinking: It's over. After a long run-up to $55 a barrel, oil prices have drifted back down to the low 40s. Prices may bounce around for a while--they always do. But buy energy stocks? Now? Forget it. Oil shares are already up more than 30% this year, compared with 7% for the S&P 500; if anything, you should be selling those stocks before gas gets cheap again, right?

Well, there's a pretty good case to be made for energy stocks now. It's true that energy industries are cyclical: Oil prices fluctuate with the economy, the weather, wars, and so forth, and those fluctuations affect the stock prices of oil companies. And it's clear that we just saw a cyclical peak when oil hit $55. But the interesting thing (positive if you're an investor, negative if you're tanking up your Dodge Ram SRT10 with the sweet V-10 Viper engine) is that there appears to be an upward trend to recent cycles. Each cyclical low has been higher than the one before. If, like most analysts we talked to, you believe oil won't get lower than the mid-30s, then today's stock prices actually look cheap. "I'm hard-pressed to tell you why crude could go below $38 a barrel," says John Olson, senior vice president at Sanders Morris Harris. He says many stocks remain priced as though oil were at $28 to $30, which explains why they have enticing price/earnings ratios between seven and 15.

The reason these cycles are moving up over time has to do with simple supply and demand. India and especially China are modernizing at a pace comparable to the West's in the 30 years after World War II. Factor in views among scientists that overall oil discoveries could top out around 2010, and this demand is bound to collide harshly with increasingly tight supply. While the timing of that clash is a matter of heated debate, few doubt it will happen.

So, yes, you'd be sitting a lot prettier had you gotten into oil last year. But when you look at the big picture of the rise in oil stocks, Olson says, "this is just the second inning."

And that leaves the question, What to buy now? You could always dip into the hottest part of the business, the "downstream" oil industry--the independent refiners, tankers, and other service companies. Some stocks in that sector have risen 90% over the past year, but it's also a notoriously volatile group. What follows is something a little different: We've come up with three basic strategies to play the energy game for the long term. Some of the companies below have figured out ways to become less prone to cyclical shocks; some are devising whole new ways to produce power. All of them are good additions to a forward-looking energy portfolio.

STRATEGY 1 Stick With the Big Boys

The safest way to invest in oil is to buy Exxon Mobil, Royal Dutch/Shell, ChevronTexaco, or one of the other so-called majors. (For more on Shell and ChevronTexaco, see "The 20 Best Bargains in the Market.") These stable behemoths have tons of capital and proven records for returning healthy dividends year after year. The group is up roughly 17%, according to J.P. Morgan analyst Jen Rowland, and many of these stocks maintain surprisingly low P/Es.

With a $60 billion market cap, ConocoPhillips (COP, $87) is a pipsqueak guard on a big-league hoops team. But moderate size gives it the agility to seize fleeting opportunities and distribute greater gains to shareholders while still exhibiting the stability of a Big Oil company. In other words, Conoco enjoys the best of both worlds. Despite its share price rising 45% over the past year, says Rowland, "this stock is way too cheap."

It's been a most outstanding year for Conoco. In September the company bought an 8% stake in Russia's Lukoil for $2 billion, securing not only a coveted share of Russia's reserves but also backdoor access to what could be a lucrative exploration of Iraq's West Qurna oilfield. That partnership alone, according to Oppenheimer senior energy analyst Fadel Gheit, should boost the company's reserves by at least 10%. "Their strategy is very clever," he says. "They pick their spots and ensure that the impact of explorations is greater on them than on their competitors." Conoco's refining operation--the largest in the U.S.--is running at 96% capacity and enjoys high margins. Meanwhile, the company has been improving its balance sheet: Since the Conoco/Phillips merger three years ago the company has reduced debt and sold off assets. In September it upped its dividend by 16%, to $2 per share.

And despite all that, it has a P/E of eight and trades at about a 30% discount to its peers.

Mega--oil company BP (BP, $60) is nearly four times the size of Conoco, placing it squarely in the slow-and-steady category. Revenue growth this year was spurred by its refining business, which is double the size of Conoco's worldwide, and BP also found a potentially lucrative Russian stake. Last year it bought a 50% share of Russia's TNK oil company and realized a 30% production boost as a result. BP has more than doubled its reserves since 1997 and is shooting for a 5% increase in production over the next few years. "A company like BP is tried and true," Gheit says. "They have a good game plan, a longer view, and they don't make mistakes."

STRATEGY 2 Go for the Fast Little Guys

Exploration and production companies, also known as E&Ps, are stepping up as the agile growth stocks of the industry. You can think of these mid- to small-cap companies as a hungry swarm of opportunists picking over Big Oil's scraps. To sustain massive production in, say, West Africa, the majors have been selling off North American oil and gas fields they discovered 50 years ago, even though as much as half of the proven reserves remain in the ground. These old projects simply don't contain enough oil to keep a $200 billion company interested--but they have plenty for a small-cap player looking for some low-risk wells. The smaller E&Ps, boosted by efficient exploration technology and oil prices that support greater extraction costs, have been snatching up these older fields. "The companies that do best are the niche players, who know what they do well and execute it," says Joe Allman, an energy analyst at RBC Capital Markets. The group has surged 40% this year.

Apache (APA, $51), at a market cap of $17 billion, can barely be called "niche." Yet the company moves with entrepreneurial gusto. It conducts international explorations but has been a master acquirer of low-risk oil in the U.S. It has also devised a creative partnership structure that is changing the way the industry views acquisitions. When a Shell property in the Gulf of Mexico came up for sale last fall, Apache partnered with Morgan Stanley to finance the deal. The investment bank bought the proven reserves on the property for a low rate of return, allowing Apache to go after the higher-risk new finds without shelling out all the capital for the acquisition. The company cut a similar deal last summer. "They are able to make transactions that others are unable to think up or execute," says A.G. Edwards analyst Thomas Covington.

Apache's profits were up 57% last quarter year-on-year. In 2005 the company could boost production by 13%, which is, as J.P. Morgan analyst Shannon Nome says, "quite respectable in an industry that struggles to eke out mid--single digits." Apache offers a slight $0.32 dividend and sells for a P/E of 12. But Lucas Capital Management CEO Russell Lucas sees lots of upside: He says Apache's share price equates to buying a barrel of the company's reserves for under $12.

Also winning in the acquisitions game is Newfield Exploration (NFX, $59). It's small--$3.7 billion market cap--and comes with more risk, but the Houston company has increased earnings and cash flow consistently over the past four years.

Newfield has seven years' worth of proven reserves. That's short of the industry average of 11 years but double where Newfield was in 1999. The company has been diversifying like crazy, the most notable example being its purchase last August of Denver gas producer Inland Resource. This January, Newfield will start drilling on a high-profile new project that, according to Nome, could add more than $20 to the company's share price in the next couple of years. The details are complex, but the project is essentially a partnership in which the company gets a 23% stake in what will be the deepest well in North America without risking any of its own capital.

By some estimates Northern Canada has more oil than Saudi Arabia, and Suncor (SU, $33) is the region's first developer. The "oil sands" region--where land is mined, not drilled, and oil is extracted by heating saturated sand until the crude drips out --might hold 308 billion barrels. About 63 billion of that is deemed easily accessible in a 25,000-square-mile region, according to Randy Ollenberger, managing director of BMO Nesbitt Burns. Suncor's reserves, happily situated several time zones away from nasty geopolitics, amount to 1.3 billion barrels, and perhaps another ten billion barrels or so of total recoverable oil. That's about 135 years' worth of reserves. "They have basically cracked a nut," says Ollenberger, who thinks the stock is a value despite its industry-high P/E of 18. "They know what they are doing."

STRATEGY 3 Go Alternative

And now for the high-risk but potentially high-reward portion of our program: renewable energy. No, it's not as cheap as oil or gas--yet. But solar power, wind generation, and other renewables are already a real deal for investors. GE said wind energy was an $8 billion business this year, and solar was worth about $4.5 billion. Denmark and Germany already get around 20% of their electricity production from wind. Conglomerates like GE and Siemens are pushing growth in the sector, but renewables are too small a part of their businesses to show up in the stock prices. That leaves the pure plays.

Fuel Cell Energy (FCEL, $9) has yet to turn a profit, but it has developed a solid product offering over its 35-year history. The Connecticut company ($455 million market cap; $34 million revenues last year) makes high-temperature, low-emission hydrogen fuel cells with patented technology. John Quealy, an analyst at Adams Harkness, says the 250-kilowatt to two-megawatt units hit a "sweet spot" for smallish industrial customers--enough to power a brewery, for example, or to back up municipal power. "This is a development-stage industry and a development-stage company," Quealy says, drawing parallels to biotech stocks. "You're betting on companies with the best management and technology and commercial paths."

The operative term is "bet." Revenues have been flat the past couple of years, but the company cut 27% from its production costs and entered into a promising agreement with Kawasaki to distribute the cells in Japan. "A value investor looking at this would laugh me out of his office," says Walter Nasdeo of Ardour Capital Partners. "But the proof of concept is there. The technology risk is extremely minimal. This company is not going away."

Investors haven't appreciated the profits of Gamesa (GAM.MC, $13), a wind-energy company near Bilbao, Spain. After a nearly 50% rise in revenues in 2003 and a three-for-one stock split last June, Gamesa's stock has slipped. It recently disappointed investors when it announced it would earn $296 million this year, a 10% increase. Despite the modest numbers, the company controls about 80% of the wind-energy market share in Spain and has been gaining in the rest of the world with nearly 12%. Last fall Gamesa opened its first wind plant in the U.S., a 50-megawatt facility in Lee County, Ill., and it says it has another 2,000 megawatts planned throughout the country. The company is also eyeing China, where the government has pledged $17 billion to bring renewable power to 12% of total electricity supply by around 2020, according to Jarett Carson of RBC Capital Management.

How much of that Chinese capital Gamesa captures remains to be seen. For that matter, we still don't know how much product Fuel Cell will move in Japan. But renewables are already big, and they're going to get bigger. "We're not generating new oil, supply is shrinking, and so from a long-term perspective investors should have a share," says Anthony Chan, a senior economist for J.P. Morgan Fleming Asset Management. "It's the wave of the future."

Seven Energy Stocks for the Long Haul


SUBSCRIBERS ONLY Read more online, including "Inside the Head of BP," at