Aviation has been one of the fastest-moving segments of the American economy this year. It's an area where you can find both good and bad investments.

Tracking both is the key to racking up the sort of consistent returns that will guarantee you a prosperous retirementBoeing is an undervalued gem right now, arguably the best large-cap aerospace stock you can buy.

But one of its key competitors, Lockheed Martin (LMT - Get Report) , is undergoing setbacks that make it a poor choice for investors. The Bethesda, Md.-based company faces significant challenges because of dramatic changes in the core industries that it serves. 

The most significant one is that cutbacks in the U.S. Army's aviation budget are radically reducing the market for the iconic Black Hawk helicopter. This is bad news for Sikorsky, the maker of the Black Hawk. This in turn is bad news for Lockheed, which acquired Sikorsky just last year for $9 billion from United Technologies .

Lockheed Martin is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. See how Cramer rates the stock here. Want to be alerted before Cramer buys or sells LMT? Learn more now.

For fiscal year 2017, the Army plans to give $22.6 billion to its modernization efforts, down from last year's $23.9 billion. Procurement programs will take the largest cut, with a proposed $15.1 billion, compared to last year's $16.4 billion.

The budget includes the Army's "Aviation Restructure Initiative," which is a euphemism for the Pentagon's effort to find new helicopters that are cheaper than the ones made by Sikorsky. The budget only provides $1 billion for 36 Black Hawks. By comparison, the Army purchased 107 Black Hawks in fiscal 2016.

November's election will probably provide little help for Lockheed. Republican nominee Donald Trump has promised to beef up the military budget, but he has also questioned American commitments to NATO and South Korea in a more fundamental way than any mainstream candidate in decades. Hillary Clinton would probably keep Pentagon spending roughly where it has been under the Obama Administration.

After the military, the oil industry has perhaps become Sikorsky's number one customer. Oil companies use lots of helicopters to get to and from marine oil platforms and drilling sites.

But the massive collapse of worldwide oil prices has cut deeply into the budget for such purchases. The Financial Times recently ran a story about oil operations near Aberdeen, the United Kingdom's most important oil city. Flights in 2015 were down 8% down relative to the previous year, thanks to the slide in North Sea crude from $112 per barrel in June 2014 to just above $26/barrel in February this year.

The move toward the oil business was the linchpin of the company's strategy of diversifying from its military sweet spot, which is likely to be squeezed no matter who wins the elections. So far, that strategy is not working, leaving the company's profit outlook facing major turbulence.

Lockheed's single biggest item is the F-35, which has been plagued by defects. Its expensive Alis logistics system has also suffered more than its share of glitches. As a result, it has been losing market share to both Boeing and Airbus AIR.PA.

Despite its problems, Lockheed Martin still has a price-earnings ratio over 21. That's noticeably higher than Boeing's 17. Clearly, Boeing has much better growth prospects.

---

When you're investing your retirement funds you can't afford to leave anything to chance. We have a report from a trader who guarantees that you will make a profit on 85% of your trades - or your money back! If you devote just nine minutes a week to this program, you are guaranteed more than $67,000 per year! For all of the details, click here now.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.