Image source: Getty Images. What: Shares of specialty materials supplier Allegheny Technologies Incorporated (NYSE: ATI) popped as much as 19.9% today after reporting second-quarter earnings results. At 3:15 p.m. EDT, shares were near their daily high at a 19.5% gain. So what: Sales fell 21% in the quarter to $810.5 million, and net loss improved from $101.2 million a year ago to $18.8 million, or $0.18 per share. Adjusted for one-time items, the loss was $0.21 per share, but that was a major improvement over the $0.39-per-share loss that analysts expected. Management said that commercial aerospace sales increased 3% sequentially, but weak demand in energy markets kept demand for flat-rolled products low. And until that changes, it's likely the company will continue to report losses. Now what: This is a classic case of beating expectations causing a sharp rise in shares. But keep in mind that low raw-material prices and weak demand in oil and gas will likely continue in flat-rolled products. Amid the losses that have been coming in over the past year, I would like to see some more bottom-line progress before jumping into shares. Beating expectations with another loss isn't enough to prove that the business is turning around, so I'll stay cautious on shares today. A secret billion-dollar stock opportunity The world's biggest tech company forgot to show you something, but a few Wall Street analysts and the Fool didn't miss a beat: There's a small company that's powering their brand-new gadgets and the coming revolution in technology. And we think its stock price has nearly unlimited room to run for early in-the-know investors! To be one of them, just click here.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.