BOSTON ( TheStreet) -- October's rally lit a fire under many laggard stocks. Seventeen S&P 500 Index companies gained at least 40% last month, and the benchmark index's top 10 gainers are up 45% to 57%.The S&P 500 surged 11% in October, the best monthly performance since 1991. Still, stocks are little changed this year after two years of gains. Investors are concerned about a sluggish U.S. economy that could deteriorate if Europe's debt woes worsen. Six of the top 10 performers on the S&P 500 are energy companies, and two are auto-industry suppliers, suggesting investors amped up the so-called risk-on trade. "It's the worst who become first" in these types of rallies, said Sam Stovall, S&P Capital IQ's equity analyst, in an interview. "It's those companies that were priced as if they are going out of business that are the ones that tend to rally the most." Companies in the energy, materials, industrials, financials and consumer-discretionary sectors led the rally, which paused yesterday, with the S&P 500 slumping 2.5%. "It is, therefore, logical that they are among the greatest advancers in this most recent snap-back rally," Stovall said. Stocks are all benefiting from a renewed sense of optimism on the heels of European leaders' tentative agreement last week on a restructuring package for the eurozone nation's with sovereign debt problems. And, domestically, there has been a series of better-than-expected economic reports allaying fears of recession, along with a steady run of strong third-quarter earnings reports from U.S. companies, further buttressing investors' positive views. Of the 181 S&P 500 companies that reported earnings as of Oct. 25, 66% beat Wall Street analysts' estimates, 23% missed and 11% met expectations, according to S&P Capital IQ. Here are the top 10 performing S&P 500 stocks in October, through Friday, Oct. 28, in inverse order: 10. El Paso Corp. ( EP) shares are up 45.5% last month and 85% this year. The company owns the largest oil and gas pipeline network in the U.S. and also operates a gas-storage and liquefied natural gas import facility. Its shares are benefiting from a planned merger with competitor Kinder Morgan ( KMI). The deal will include the sale of El Paso's exploration and production assets and the subsequent combination of its huge pipeline operations with those of Kinder Morgan to create the dominant oil and gas pipeline network in the nation, bringing fuel to both the East and West Coast markets.