What happened

April was a miserable month for stocks, with the S&P 500 down more than 8% for the month. But specialty metals producer Allegheny Technologies (ATI -2.43%) finished the month up 1.3%, according to data provided by S&P Global Market Intelligence, thanks to stable aerospace demand and geopolitical factors that are pushing more business Allegheny's way.

So what

Allegheny is the maker of lightweight titanium and other specialty components used primarily by the aerospace industry. The company did not release first-quarter earnings until almost the end of April, but investors got a few hints about the quarter in the weeks leading up to earnings that helped give the shares wings.

A standing aerospace technician looks up to inspect an engine.

Image source: Getty Images.

On April 12, Boeing announced a total of 95 commercial airplane deliveries in the quarter, up from 77 deliveries in the same quarter a year ago. And Allegheny said around the same time that the surcharges paid by customers on key metal inputs were on the rise, a sign that the company is having success passing on rising commodity prices to customers.

These developments came with the backdrop of the ongoing Russian invasion of Ukraine, which could have a material impact on Allegheny's future business. Sanctions against Russian companies should give Allegheny a competitive advantage in winning new business against Russian metal supplier VSMPO, but historically, Russia has been a major source of nickel and other raw materials companies like Allegheny need.

Now what

On May 4, when Allegheny announced first-quarter results, the numbers did not disappoint. Allegheny earned $0.40 per share in the quarter on $834.1 million in revenue, beating analyst expectations for $0.20 per share in earnings on $750 million in sales. More importantly, management said the momentum should continue.

"Looking ahead to the second quarter, we expect continued growth in our most significant end markets," CEO Robert Wetherbee said in a statement. "Recognizing the current geopolitical volatility in Europe and Asia," he added,

creates both challenges and long-term opportunities for ATI, we're working closely with our customers and suppliers to ensure we are in the best position to effectively accelerate our business velocity and reward our stakeholders over time.

Indeed, management has a lot to juggle right now between supply chain disruptions, potential issues sourcing raw materials, and uncertainty about global markets. But so far, Allegheny appears to be navigating through this rough patch quite well. In a month when investors were focused on selling stocks plagued by uncertainty, Allegheny's stability made it a top performer.