Shares in the gold sector soared immediately after Britain voted to leave the European Union – dubbed Brexit – but have produced mixed results recently. This is likely due to a pullback in the price of gold as uncertainty in the markets decreases and investors around the world come to terms with what Brexit could mean for the global economy.

St Barbara Ltd (ASX: SBM), for instance, rocketed to a high of $3.77 just over a week ago, but has since retreated to $3.40. It’s down nearly 1% today as well after the miner released its production report for the June quarter, which may have played a role in Macquarie’s decision to downgrade the shares from Outperform to Neutral.

The miner produced almost 386,600 ounces of gold during financial year 2016 (FY16), up from 377,400 ounces in FY15. While production at both Gwalia and Simberi exceeded the upper end of guidance for FY16, the mid-point of guidance for FY17 suggests investors should expect a drop of nearly 6% in production for the year.

Shares of Northern Star Resources Ltd (ASX: NST) have also retreated from their recent high levels, but are trading 1.9% higher today at $5.41. The miner also announced its June quarterly activities to report underlying free cash flow of $64 million and gold sales of 561,200 ounces in FY16. That was in the top quartile of full-year guidance of between 535,000 and 570,000 ounces.

Meanwhile, shareholders of Independence Group NL (ASX: IGO) are having a day to forget. The gold miner’s shares have fallen 7.8% thus far and are trading at $3.91 which appears to have coincided with a downgrade by analysts at Macquarie. According to Dow Jones Newswires, Macquarie cut its price target on the shares by 3% to $3.90, which comes a little over a week after it raised its target on the shares by 8% to $4.

Despite today’s decline, the miner’s shares have still generated huge gains for investors so far in 2016. In fact, they have nearly doubled in price since they hit a low of $1.975 late in January, which compares to a (still impressive) 13.1% gain for the S&P/ASX 200 (Index: ^AXJO) (ASX: XJO) in the same time.

Although some investors think now could be a decent time to pick up shares in the gold sector, those investors do need to remember the risk that gold prices could retreat from their current level. Considering the enormous gains piled on by shares in the sector so far this year, a reversal in the gold price could be very bad news for investors with heavy exposure to the gold miners.

Of course, you don't need to invest in gold to get rich in the share market. Click here now to discover how 1 Man Turned $10K Into Over $8 MillionLearn more about this man and how you can start down the path toward financial independence. Simply click here to learn more.

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