Up until today one of the best-performing shares on the S&P/ASX 200 (Index: ^AXJO) (ASX: XJO) in 2016 was utility company AGL Energy Ltd (ASX: AGL). As of yesterday’s close its share price had climbed over 12% compared to the 1.2% decline of the benchmark S&P/ASX 200 index.

Unfortunately for shareholders a significant portion of these gains has been wiped out today after its share price dropped 6% shortly after the market opened. The drop came as a result of an update from the company warning on its earnings growth due to its FY 2017 gas portfolio margins.

Management advised that due to safety issues restricting output at a key supplier’s project and heightened demand at the AGL Torrens power station, it has been forced into sourcing a higher-than-anticipated proportion of wholesale gas.

Unfortunately by tapping the spot market for its gas needs, AGL Energy now expects margins in its Energy Markets gas portfolio to be lower year on year by at least $100 million. Although it still expects earnings growth in FY 2017, judging by the market reaction to the news there is a great sense of disappointment.

It is worth pointing out that this will have no bearing on FY 2016’s results. Management reiterated its guidance for underlying profit in the upper half of its guidance range of $650 million to $720 million.

Investors with a long time horizon might want to consider this sell off as a buying opportunity. The company has been busy selling non-strategic assets and recently disposed of its 50% share in the Diamantina Power Station for $151 million to APA Group (ASX: APA). This is all part of its strategy to exit the exploration and production side of the business and instead focus on supplying wholesale and retail customers with energy supplies.

I think the asset-light AGL Energy is a very appealing investment which I would put ahead of industry peers APA Group and DUET Group (ASX: DUE). Its defensive qualities in these volatile markets, strong earnings, and a growing fully franked dividend would make it a worthy addition to most portfolios in my opinion.

Finally, if you do want to add AGL Energy to your portfolio then I would suggest removing one of these three rotten ASX shares from your portfolio whilst you do so. Each of these shares could be doing more harm than good for your portfolio.

3 Rotten Shares to Sell, and 1 to Buy Today

After a double-digit rally for the ASX since 2016 lows, investors should be on high alert. You'll find a full rundown below of 3 shares we think you should avoid today plus one top pick worth buying, even if the market turns south and the RBA keeps rates at an "emergency low." Simply click here to uncover these stocks.

HOT OFF THE PRESSES: Motley Fool’s #1 Dividend Pick for 2017!

With its shares up 155% in just the last five years, this ‘under the radar’ consumer favourite is both a hot growth stock AND our expert’s #1 dividend pick for 2017. Now we’re pulling back the curtain for you... And all you have to do to discover the name, code and a full analysis is enter your email below!

Simply enter your email now to receive your copy of our brand-new FREE report, “The Motley Fool’s Top Dividend Stock for 2017.”

By clicking this button, you agree to our Terms of Service and Privacy Policy. We will use your email address only to keep you informed about updates to our website and about other products and services we think might interest you. You can unsubscribe from Take Stock at anytime. Please refer to our https://www.fool.com.au/financial-services-guide">Financial Services Guide (FSG) for more information.

Motley Fool contributor James Mickleboro has no position in any stocks mentioned. The Motley Fool Australia has no position in any of the stocks mentioned. 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. This article contains general investment advice only (under AFSL 400691). Authorised by Bruce Jackson.