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:


El Paso Corp.


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) - Get Report

. 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.


Joy Global's


stock is up 46.2% in October and 5.7% this year. The company is one of the world's largest manufacturers of mining equipment, including electric shovels, dragline excavators and drills. It is benefiting from the boom in commodities prices.


Denbury Resources

(DNR) - Get Report

advanced 46.5% last month but has declined 11.7% this year. It is an independent oil exploration and production company with a unique angle, it focus on injects carbon dioxide into wells that others may have abandoned to enhance oil recovery.

Early this month, the Plano, Texas-based company said it plans to buy back as much as $500 million of its own stock, saying it thinks the company is undervalued.


Goodyear Tire and Rubber

(GT) - Get Report

TheStreet Recommends

shares have risen 47% last month and 25% in 2011. The company is one of the biggest manufacturers of tires and other rubber products in the world. Its shares jumped almost 8% Friday, after it reported its third consecutive quarterly profit. Goodyear Tire and Rubber is benefiting from increased demand for new cars in the U.S. and abroad.


National Oil Well Varco's

(NOV) - Get Report

stock has soared 47.8% in October and 13% this year. It is one of the largest oil-rig and drilling-equipment suppliers in the oil and gas production industry and has a corner on the offshore oil drilling rig business.


Alpha Natural Resources


shares jumped 50.1% last month, but is down 55.8% this year. The company is a producer of high-quality thermal and metallurgical coal, and recent acquisitions have made it one of the biggest coal producers in North America.


Valero Industries

(VLO) - Get Report

jumped 50.2% last month and 16% so far in 2011. The company operates 13 refineries, making it the top independent refiner in the U.S.


F5 Networks'

(FFIV) - Get Report

stock gained 51.5% last month but has dropped 17.3% this year. The company makes products that help companies manage their computer network traffic, applications, and security.

Its customers include many Fortune 500 companies as well as Internet service providers, managed hosting providers and e-commerce sites. The company last week reported a 40% earnings gain in its third quarter.


Nabors International

(NBR) - Get Report

shares are up 55.4% this month, bringing the yearly decline to 18.8%. The company is one of the world's largest land-rig drilling contractors and is benefiting from the North American oil shale boom.

Last week, Nabors reported a strong third quarter that bested Wall Street's average estimate by 3 cents per share. Nabors earned $74.3 million on revenue of $1.66 billion. The company was in the news yesterday for giving its 81-year-old chairman a $100 million cash severance-style payment even though he isn't leaving the company, but only giving up his CEO post.


Harman International


is the leader of the pack with a share price gain of 56.7% in October. Nevertheless, its shares are down 2.9% this year.

The recent jump came after the audio-equipment maker posted a higher first-quarter profit than expected by Wall Street. The results were helped by sales to both consumers and auto makers that install its car audio systems as original equipment. Harman International has also seen demand pick up for its products used in sound reinforcement, and in the broadcast and recording industries.

>>To see these stocks in action, visit the

10 Best-Performing Stocks in October Rally

portfolio on Stockpickr.

Disclosure: TheStreet's editorial policy prohibits staff editors and reporters from holding positions in any individual stocks.