Gold producers have given back some of their big gains, and investors who missed the rally earlier this year are wondering which stocks look attractive after the pullback.

Let’s take a look at Goldcorp Inc. (TSX:G)(NYSE:GG) to see if it deserves to be in your portfolio.

Tough times

To say Goldcorp has underperformed in 2016 is a bit of an understatement. The company’s shares are up 24% on the TSX this year compared to gains of 100%, or better, for many of its peers.

This is uncommon territory for Goldcorp, which has historically been the go-to name in the sector.

What’s the issue?

Goldcorp slashed its dividend last year and production has fallen significantly, while costs are on the rise.

The company reported Q2 2016 gold production of 613,400 ounces compared to 908,000 ounces in the same period last year. All-in sustaining costs (AISC) for Q2 came in at US$1,067 per ounce–up from AISC of $853 per ounce last year.

Planned lower ore grades are partly responsible for the reduction in output, but the company also ran into operational issues at a number of mines during the quarter.

As a result, adjusted operating cash flow was US$307 million in the second quarter compared to US$523 million in Q2 2015.

That doesn’t sound great, and it isn’t, but the situation is expected to improve.

Positive outlook

In an October 8 news release, Goldcorp maintained its 2016 production guidance of 2.8-3.1 million ounces at AISC of US$850-925 per ounce, despite recent disruptions at its Peñasquito mine.

Staff reductions at both the corporate and operating levels will help reduce overall annual expenses by US$250 million through the end of 2017.

The company recently completed its acquisition of Kaminak Gold, which comes with the coveted Coffee project. Coffee has three million ounces of indicated gold reserves and comes with 60,000 hectares of adjacent land that could produce additional discoveries. First gold production at Coffee is targeted for the end of 2020.

Goldcorp also plans to expand operations at Peñasquito and another facility, Musselwhite. The company expects high rates of return on the new investments, and overall AISC should come down in the coming years.

Should you buy?

Contrarian investors who are bullish on gold might want to take a small position in Goldcorp before the Q3 numbers come out. The company appears to be through the toughest phase of its turnaround efforts, and the stock could start to catch up to its peers if the market sees material improvements in the coming quarters.

Stock buy alert hits astounding 96% success rate!

The hand-picked investing team inside Stock Advisor Canada recently issued a buy alert for one special type of "bread-and-butter" stock where The Motley Fool U.S. has banked profits on 23 out of 24 recommendations. Frankly, with an astounding 96% success rate that has delivered average returns of 260%, chances are this new pick could deliver life-changing returns as well. Because the team at Stock Advisor Canada fully embraces the same time-tested investing philosophies that have led to countless Motley Fool winners globally. So simply click here to unlock the full details behind this new recommendation and join Stock Advisor Canada.

*96% accuracy includes restaurant stock recommendations from Motley Fool U.S. services Stock Advisor, Rule Breakers, Hidden Gems, Income Investor and Inside Value since each services inception. Returns as of 5/27/16.

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Andrew Walker owns shares of Goldcorp.