The major U.S. stock indices traded higher today, in part because the economic drag of budget deficits in Washington appears to be coming to a slow end. The federal government said it ran a $107 billion surplus in April, when many people pay taxes from the previous year. For the first seven months of the federal fiscal year, the government has run a $306 billion deficit, which is 37% lower than a year ago.

In response, the Dow Jones Industrial Average (DJINDICES:^DJI) was up 6.6% with broad gains across the index. It may not seem like the budget deficit has much to do with corporate America, but in a macro sense there's a huge impact. Gross domestic product growth and employment has been hampered by federal spending cuts in recent years, and even a flat budget would offer a positive impact on the economy.  

On a more focused level, there may be less pressure on the government to cut military spending, which in recent years has seen major cuts that have hurt Boeing (NYSE:BA) and United Technologies (NYSE:UTX). That hope is a big reason they're both up over 1% today.

Utx F

Pratt & Whitney's F135 engine powers the next generation F-35C Lightning II fighter. Source: United Technologies.

Military stocks pop
Defense spending is down 5% so far this fiscal year; while that's good for the budget, it isn't good for companies that make military goods.

Boeing saw a 13% decline in military aircraft revenue in the first quarter, and revenue was down 6% in the defense, space, and security segment. Commercial aircraft continue to drive Boeing, while the military is a drag.  

A similar dynamic is playing out at United Technologies, which has seen Sikorsky helicopters struggle and saw Pratt & Whitney's revenue fall 2% in the first quarter. UTC Aerospace grew slightly in the quarter, but all three divisions have both military and commercial sales so they're not a direct reading of military segment revenue.  

Utx Sikorsky Image

Sikorsky helicopters serve many branches of the military. Source: United Technologies.

If pressure on the federal budget eases -- which seems to have happened recently -- we should see military spending level out or maybe even rise in the next few years. That would be a boon for Boeing and United Technologies, which are already benefiting from a boom in global commercial flight. That hope is why their stocks are outperforming even a strong Dow today.

Take advantage of this little-known tax "loophole"
Spending cuts are only one side of the falling budget deficit. Recent tax increases have affected nearly every American taxpayer. But with the right planning, you can take steps to take control of your taxes and potentially even lower your tax bill. In our brand-new special report "The IRS Is Daring You to Make This Investment Now!," you'll learn about the simple strategy to take advantage of a little-known IRS rule. Don't miss out on advice that could help you cut taxes for decades to come. Click here to learn more.

Travis Hoium has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.

Compare Brokers