The phrase "Pyrrhic victory" may not be precisely apropos, but it certainly springs to mind when reviewing the swings in stock price at General Dynamics (NYSE:GD) last week. With the broad market downturn erasing the 3.5% gain the stock enjoyed post-earnings on Wednesday, leaving the stock down 1.2%, it feels like the quarter's earnings battle was hardly worth winning.

That said, Fools know that what matters in investing long-term is not the day-to-day gyrations of the digits attached to a ticker symbol, but the performance of the business that symbol represents. In that respect, General Dynamics scored a real victory last week. The firm:

  • Grew its second-quarter revenue 11% year over year.
  • Generated $292 million in free cash flow ($761 million year-to-date).
  • Increased profits from continuing operations more than twice as fast, to $1.27 per share.
  • Increased its full-year earnings guidance to $4.85 to $4.90 per share.

Margins
In last week's Foolish Forecast, we sketched out the four main business segments that make up General Dynamics and noted how the firm was improving margins in three of the four, but losing ground in its biggest business -- Information Systems and Technology (IST). I noted at the time, "If there's one thing that General Dynamics can do to juice its already better-than-expected earnings even further going forward, I'd say it would be to get margins moving in the right direction in this IST division."

At the risk of invoking negative connotations, let me say this: mission accomplished. Q2 saw the General expand its IST margins by 40 basis points -- and do even better with margin expansion in both marine systems and aerospace. This time around, it was only the firm's second-largest business (combat systems) that saw its margins fall. The sum of all these improved parts was firmwide operating margins of 11.5%, up 60 basis points year over year.

Dust on the horizon
Granted, it wasn't all wine and roses in this defense contractor's news. As we've seen elsewhere in this sector -- at Lockheed (NYSE:LMT), Ceradyne (NASDAQ:CRDN), and Northrop (NYSE:NOC), for example (but not at Textron (NYSE:TXT)) -- new orders were weak, and insufficient to replenish the quarter's sales. As a result, General D's total backlog (but not its funded backlog) declined year over year.

Still, overall, it was a successful quarter. More's the pity that Mr. Market forgot that so quick.

Don't make the same mistake yourself.

Get a better general picture of the General's recent performance with:

Fool contributor Rich Smith does not own shares of any company named above. The Fool has a disclosure policy.