What happened

Shares of Lockheed Martin (LMT 1.65%) gained 5% on Wednesday, the stock's second straight day of strong gains following the company's earnings release. Given the pandemic and its aftereffects, not many companies are beating consensus and raising full-year expectations, but Lockheed Martin is proving that a defense company is a good defense against market volatility.

So what

Lockheed Martin on Tuesday reported second-quarter earnings of $5.79 per share on revenue of $16.2 billion, besting analyst expectations for $5.72 in EPS on revenue of $15.23 billion. Earnings were up 16% year over year, and revenue was up 12% from the same three months of 2019.

A Lockheed Martin F-22 in flight.

A Lockheed Martin F-22. Image source: Lockheed Martin.

The company sees no sign of that momentum slowing. Lockheed Martin raised full-year guidance for earnings, revenue, and cash generation, now expecting to earn between $23.75 and $24.05 per share for the year on revenue of $63.5 billion to $65 billion.

Lockheed Martin expects to generate at least $8 billion in cash from operations, which should support another dividend increase. It could also support expansion efforts, with shares of Kratos Defense & Security Solutions (KTOS 2.21%) moving higher on Wednesday on rumors it could be an acquisition target for Lockheed Martin.

The Kratos rumor could be giving an extra lift to Lockheed shares on Wednesday. Kratos is a drone maker that so far has done a better job creating interesting products than actually securing large government contracts for those products, but the portfolio would fit in nicely with Lockheed Martin's sprawling aeronautics operations.

Now what

It's tough to read too much into acquisition rumors, but Lockheed Martin on its own is a stock worth looking closely at. It has outperformed the S&P 500 by about 40 percentage points in the last five years and has the best portfolio in the industry. And with a $150-billion order backlog, it should hold up well even if the Pentagon's budget comes under pressure in the years to come.

Lockheed Martin shares swooned earlier in the year along with the broader market due to pandemic concerns, but the company in the second quarter showed its business is holding up well through the crisis. Investors post-earnings are believers that the outperformance can be sustained.