CHART: Gold mining stocks breakout 2016

Gold ended the last trading day of 2016 on a sour note, but the precious metal should at least enter the new year having broken the downtrend in place since the election of Donald Trump.

In late afternoon trade on the Comex division of the New York Mercantile Exchange gold for February delivery was changing hands for $1,1152.90 an ounce, down $5.20 from Thursday's close.

Gold ends 2016 with a gain of 8.6% after touching six-year lows at the end of 2015. But bears had the better of it in the second half of the year – the metal declined by more than 16% after hitting an intra-day high of $1,377 on July 6.

It's the first annual gain since 2012. For the year the average gold price came in at $1,247 an ounce, compared to 2015's average of $1,160, but nowhere near 2012's $1,689.

The stock of the world's top gold miners outperformed the metal by a huge margin with even large cap counters like Barrick Gold and Newmont Mining doubling or nearly doubling in value since the start of the year:

CHART: Gold mining stocks breakout 2016