Editors' pick: Originally published Dec. 30.

We've made it to the final trading session of 2016 and, barring any unforeseen surprises this afternoon, this year will end up as another double-digit gainer for the big S&P 500 index. On a total returns basis, the S&P is up 12.43% year-to-date as of yesterday's close, plowing to new all-time highs in the process.

But don't get too excited about this year's stock market rally just yet. That's because while the market averages certainly scored a major win, a surprisingly large chunk of the individual stocks that make up those averages didn't participate in it. As I write, nearly one-in-three S&P components is actually down since the start of 2016. That's a huge performance gap between the leaders and the laggards in this market.

As the calendar rolls over to 2017, avoiding the worst-performing stocks is likely to have more to do with your investment success than picking the very best ones.

To figure out which stocks you should be avoiding as we close out the year, we're turning to the charts for a technical look at five that could be about to turn "toxic."

For the unfamiliar, technical analysis is a way for investors to quantify qualitative factors, such as investor psychology, based on a stock's price action and trends. Once the domain of cloistered trading teams on Wall Street, technicals can help top traders make consistently profitable trades and can aid fundamental investors in better entry and exit points.

Just so we're clear, the companies I'm talking about today are hardly junk.

By that, I mean they're not next up in line at bankruptcy court - and many of them have very strong businesses. But that's frankly irrelevant to what happens to their stocks; from a technical analysis standpoint, sellers are shoving around these toxic stocks right now. For that reason, fundamental investors need to decide how long they're willing to take the pain if they want to hold onto these firms in the weeks and months ahead. And for investors looking to buy one of these positions, it makes sense to wait for more favorable technical conditions (and a lower share price) before piling in.

So, without further ado, let's take a look at five "toxic stocks" to sell - and when to sell them.

Abbott Labs

Image placeholder title

Up first on the list is $56 billion pharma stock Abbott Labs (ABT) - Get Report. Abbott has had a rough year in 2016 -- year to date, shares have lost about 15% of their market value, which means that they're underperforming the S&P 500 by about 25% in the trailing 12 months. The bad news for Abbott shareholders now is that this stock is pointing towards a second leg lower this winter.

Abbott is currently forming a descending triangle setup, a bearish continuation pattern that's formed by horizontal support down at $38, and downtrending resistance to the top side. Basically, as Abbott has pinballed in between those two technically important price levels, shares have been getting squeezed closer and closer to a breakdown through that $38 price floor. When that line in the sand gets crossed, we've got a new sell signal in shares of Abbott.

Shares are within grabbing distance of that $38 price floor as I write, after closing just 31 cents above it on Thursday. The break needs to be material to be technically valid, but once it happens, investors need to be quick to sell before Abbott reaches new lows at the $36 level. Keep a close eye on this one in the sessions ahead.

Shake Shack

Image placeholder title

After a choppy beginning to 2016, Shake Shack (SHAK) - Get Report was finally beginning to show some promise in the last couple of months, popping 10% on positive third quarter earnings results after bottoming at the end of October. But that rebound is on shaky ground thanks to a bearish reversal pattern that's been forming in shares of Shake Shack in the intervening trading sessions.

Shake Shack has spent the last month and a half forming a double top, a bearish reversal setup that looks just like it sounds. The pattern is formed by a pair of swing highs that top out at approximately the same price level, separated by a trough that identifies the breakdown level for shares. In Shake Shack's case, the breakdown comes on a violation of support at $35.50.

Price momentum, measured by 14-day RSI in SHAK's chart above, is an extra red flag to pay attention to in this price setup. That's because our momentum gauge rolled over in November, making lower highs during the double top pattern. Momentum is a leading indicator to price, and the lower peaks create a bearish divergence that suggests buying pressure is waning here. If $35.50 gets violated, shares are likely to re-test prior lows at $31.

Enstar Group

Image placeholder title

We're seeing the exact same price setup right now in shares of mid-cap insurance stock Enstar Group  (ESGR) - Get Report. Like the rest of the financial sector, Enstar has been rallying hard since election day, but shares are starting to look "toppy" thanks to a textbook example of a double top setup. For Enstar, the $190 support level is the breakdown price to watch.

What makes that $190 level in particular so significant? It all comes down to buyers and sellers. Price patterns, like this double top setup in Enstar, are a good quick way to identify what's going on in the price action, but they're not the actual reason it's tradable. Instead, the "why" comes down to basic supply and demand for shares of the stock itself.

The $190 support level in Enstar is a place where there has been an excess of demand for shares this month; in other words, it's a spot where buyers have been more eager to step in and buy shares than sellers have been to take gains. That's what makes a breakdown below $190 so significant - the move means that sellers are finally strong enough to absorb all of the excess demand at that price level. So, if ESGR breaks $190, you don't want to own it anymore.

Alexion Pharmaceuticals 

Image placeholder title

It shouldn't come as a big surprise that $27 billion pharma firm Alexion Pharmaceuticals (ALXN) - Get Reportis looking "toxic" right now. This big-cap drug stock has been a blight on investors' portfolios all year long, shedding more than 35% of its market value since January. The problem here is that shares could have even further to tumble as Alexion unsuccessfully tests resistance this week.

Alexion has been bouncing its way in a downtrend all year long, giving traders predictable exit opportunities since the first quarter of 2016. Alexion's downtrend is identified by a trendline resistance level that has acted like a down-sloping ceiling for shares during that stretch -- every time this stock has touched the top of its price channel, shares have gotten batted lower. And Alexion is bouncing off of that ceiling for a sixth time this week.

Waiting for this week's bounce lower before clicking "sell" is a critical part of risk management for two big reasons: it's the spot where prices are the highest within the channel, and alternatively it's the spot where you'll get the first indication that the downtrend is ending. Remember, all trend lines do eventually break, but by actually waiting for the bounce to happen first, you're confirming that sellers are still in control before you unload shares of Alexion.

Bank of New York Mellon

Image placeholder title

Last on our list of potentially bearish trades is a stock that's actually been a phenomenal name to own in your portfolio this year: $50 billion bank Bank of New York Mellon Corp. (BK) - Get Report. BNY Mellon has been a market leader in 2016, rallying almost 15% on a price basis since the start of the calendar year. But it might be time for investors to think about taking some gains on BNY Mellon this winter -- shares are looking "toppy" here.

BNY Mellon is currently forming a head and shoulders top, a bearish reversal pattern that indicates exhaustion among buyers. The pattern is formed by two swing highs that top out at approximately the same level (the shoulders), separated by a higher high (the head). The sell signal triggers when BNY Mellon's neckline gets materially violated -- that happens at the $47 price level.

Remember to be reactionary with the BNY Mellon trade -- or any of the other potentially toxic setups on this list. Shares don't become a high-probability sell until they actually violate their price floor. Until then BNY Mellon is simply waving a caution flag for buyers.

At the time of publication, author had no positions in the stocks mentioned.