Editor's Note: Jon D. Markman writes a weekly column for CNBC on MSN Money that is republished here on TheStreet.com.

Misguided missiles seem to be flying around the world at record rates these days. Predictably, shares of the largest defense contractors are hitting all-time highs.

Investors have always turned to big Pentagon vendors for safe haven in times of fear and mayhem. Yet I can't help wondering if the smell of burning cordite won't be coming just from these companies' products but also from their falling stocks. They're rather expensive at a time when military spending is slowing.

Shares of most small defense contractors already have been pummeled, with many trading at multiyear lows. Either the smaller companies will soon turn around or the larger outfits will stall. The latter is more likely, as military spending plateaus from sheer exhaustion in the U.S. after a tremendous post-9/11 rise. The defense budget may face trimming if Democrats win a majority in Congress this fall.

So what's the right strategy to put your portfolio on a war footing? Go long selected defense contractors now, but trail a sell-stop to capture profits in case peace breaks out. Meanwhile, avoid contractors with a lot of exposure to commercial aviation.

Darlings in Volatile Times

Defense stocks are popular with investors during times of market volatility because their performance tends not to be correlated with the S&P 500. They tend to be linked to national threats more than to macroeconomic factors.

Since the Pentagon budget amounts to only 3% of U.S. gross domestic product, defense spending itself has limited impact on the rest of the market, according to a recent analysis by brokerage Sanford Bernstein. The upshot: The Pentagon could spend a ton on weapons systems, and it wouldn't have much effect on gross domestic product gains. But it would have a huge effect on contractors.

Lockheed Martin ( LMT) and Northrop Grumman ( NOC) are the best defense plays because, according to Bernstein's analysis, they have the lowest correlation with the broader economy. If you can take just one, I'd give a nod to Lockheed because of its exceptional operational results and focus.

General Dynamics ( GD), Boeing ( BA) and Raytheon ( RTN) appear to be in the greatest danger of flaming out after advances of 40% to 80% in the war-on-terror era, a five-year span in which the broad indices rose only 7%. The companies have limited prospects at the Pentagon because of their particular weapons programs. More importantly, they face a near-certain slowdown in discretionary corporate spending.

Why does Lockheed fly alone at the front of the pack? It's the only one that has almost fully divested itself of commercial business. The Maryland-based defense goliath gets 85% of its sales from the U.S. government, 13% from foreign governments and just 2% from companies (mostly for space-launch services and satellites).

Surprising Financials

Besides skirting the commercial market, it uses some artful financial engineering to improve its mojo. Rather than using the cash flow that it gets from U.S. taxpayers to buy new businesses, management has bought back stock.

Last week, Lockheed surprised Wall Street with strong quarterly earnings and by boosting its 2006 earnings-per-share forecast by 10% -- to the $5.10 to $5.30 range from $4.65 to $4.85. Of the increase, 34 cents came from improved operations -- but another 8 cents came from share buybacks. Lockheed has repurchased 36 million shares in the past year, while sharply reducing the number issued in its options-compensation programs to 16 million.

Looking out as far as 2007, there is potential for Lockheed to earn $6 a share as the quantity of shares drops. At its usual price-to-earnings multiple of 16, that means Lockheed could trade as high as $96 by the end of next year, or about 20% higher than today. If you think investors will become so enamored with the jetmaker that they're willing to lift its multiple back to the 18 to 22 range, then shares could soar to $120 in two years, 50% higher.

New products could also bolster the company: Last week it announced the sale of an Atlas V rocket to launch NASA's Lunar Reconnaissance Orbiter mission in 2008 -- a step toward returning humans to the surface of the moon.

Stuck in a Holding Pattern

Most of Lockheed's peers aren't as lucky. Raytheon has turned around in recent years under new management, and this has been rewarded with a 100% advance in the shares since September 2001. The company turned around its moribund missile business, producing the hard-hitting Tomahawk, Maverick and Paveway projectiles more cheaply and getting its once-faltering missile defense, marine and communications programs under control.

But slow sales of its Beechcraft private propeller planes and Hawker business jets have provided a lot of turbulence. The commercial aviation division will probably be unloaded soon, but it's still enough of a drag on results to keep margins from expanding further. The shares probably reflect the fair value of Raytheon, so they'll be lucky to just stay in a holding pattern.

With General Dynamics, it's the same story. The company's defense business is more closely related to the Army, which buys its M-1 tank upgrades, Stryker vehicles and ammunition, as well as communications and simulation training. Army programs amount to 20% of General Dynamics' sales, compared with around 10% for Lockheed, mostly in technology and communications. The Pentagon under Defense Secretary Donald Rumsfeld seems to prefer air war to ground war, so Army modernization programs are probably at or beyond a peak.

Meanwhile, earnings at General Dynamics' Gulfstream jet business is probably peaking. A pinch from a slowdown in the broad corporate market would hurt.

Defense stocks can defend your portfolio at a time of geopolitical and broad economic uncertainty, but you need to focus. For now, buy Lockheed when it dips, as it has potential to the mid-$90s by the end of next year.
At the time of publication, Jon Markman did not own any stocks mentioned in this column.

Jon D. Markman is editor of the independent investment newsletter The Daily Advantage. While Markman cannot provide personalized investment advice or recommendations, he appreciates your feedback; click here to send him an email.

If you liked this article you might like

Markman: Performant Collects

Markman: Performant Collects

A Stock With Benefits

A Stock With Benefits

A Data-Center Operator in a Good Space

A Data-Center Operator in a Good Space

Markman: Plant a Seed in Argentina

Markman: Plant a Seed in Argentina

Tap In to the Organic Craze

Tap In to the Organic Craze