After posting a couple straight years as one of the best-performing stocks in the S&P 500, Nvidia Corp. (NVDA) has handed investors an ugly example of mean reversion in 2019.

Shares of the chipmaker were the worst-performing issue in the S&P during the final quarter of 2018 - as of this writing, they're down almost 45% since the calendar flipped to October 2018. In a three-month stretch, Nvidia's momentum reversal unwound more than a year's worth of upside.

That's the bad news.

The good news is that, after selling off hard, shares could finally be in store for a rebound as stocks point up and to the right in 2019.

To figure out how to trade shares of Nvidia here, we're turning to the charts for a technical look.

As we've seen repeatedly in the recent market correction, context matters. Nvidia's position as the worst performer in the final quarter of last year looks bad on the surface, but it's somewhat less brutal when you consider the fact that shares are still up about 50% in the trailing two years.

That's still more than double the annualized return of the S&P 500 over that same timeframe. Now, an inverse head-and-shoulders pattern is clearing the way to a breakout move in Nvidia this winter.

The setup in Nvidia signals exhaustion among sellers, something that's not hard to imagine considering the size of the selloff. The setup is formed by a pair of swing lows with a deeper swing low in between them - and the buy signal comes on a breakout through Nvidia's neckline, currently at the $160 level. A breakout through $160 clears the way to higher ground.

Don't let the silly name fool you; the head and shoulders is an effective trading setup. An academic study conducted by the Federal Reserve Board of New York found that the results of 10,000 computer-simulated head-and-shoulders trades resulted in "profits [that] would have been both statistically and economically significant."

It's a setup we're seeing right now in quite a few oversold reversal trades, not just Nvidia.

Nvidia's momentum gauge offers some extra evidence for a turnaround in shares. 14-day RSI up at the top of the chart has been making higher lows of its own as its stock price carved out the reversal setup.

At this point, it's still a little too early to call the Nvidia reversal a done deal. Relative strength is yet to break out of a series of lower highs, suggesting that while Nvidia is showing signs of life here, shares still aren't systematically outperforming the broad market indices just yet.

Shares are flirting with their $160 resistance level this week. Look for a material move up through that price level as the signal that it makes sense to bet on a rally for Nvidia.

Shares of Nvidia closed Tuesday down 0.45% at $156.64.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.