In mid-July, anyone investing in gold mining companies saw their year-to-date share prices fall to levels not seen since the 2008 financial crisis, down more than 50% on the year.
As Money Morning Global Investing Strategist Martin Hutchinson pointed out, no sector right now is more unloved than the gold sector.
The sector's selloff was fueled by the steep decline in the price of gold, which in turn led to a rash of write-downs on gold assets across the industry. The past two months alone saw over $21 billion in write-offs across the industry globally.
The biggest gold companies led the way in writing down their assets.
Barrick Gold Corp. (NYSE: ABX), the world's biggest gold producer, took an $8.7 billion write-down. It is also in the process of trying to sell some of its assets.
The world's largest market cap gold producer, Goldcorp (NYSE: GG), recently wrote down its assets by $1.96 billion. The company also lowered its planned spending target on projects.
That write-down was followed by a similar announcement from Newmont Mining Corp. (NYSE: NEM), the world's second-largest gold producer. Newmont's write-down amounted to $1.77 billion.
A funny thing happened, though, after the write-downs were announced.
The stocks of the companies involved, after an initial blip down, stabilized. Perhaps the vicious selloff in these stocks earlier this year had anticipated this bad news.
The only question now for investors is if the worst is over - do higher prices lie ahead in 2013 for those investing in gold miners?
A bounce from the lows in the Market Vectors Gold Miners ETF (NYSE: GDX) supports the thought that the sector has bottomed. The ETF is up more than 10% in five days.
So does the fact that money is flowing back into the ETF. More than $100 million flowed into the fund since it bottomed in late June.
But the real positive for the gold mining companies is the fact that gold has climbed back above $1,300 an ounce and stayed there...
This price of gold is a level where many of the major gold mining companies can make a profit. Below $1,200 an ounce, as much as half of global gold production would become an unprofitable venture.
To find the best opportunities, however, investors will need to do a little homework. There are many things to consider when investing in gold miners, including cash flow.
But there's one very key number to look at among all the figures released by gold companies...
The Key: "All-In" Costs
The rather new "all-in" cost of mining is what investors need to focus on. Some gold miners have been using this number for a while now. Gold Fields (NYSE: GFI), forb example, began using it in 2008.
The "all-in" number includes not only all the costs to develop a resource, but all the costs incurred in sustaining production at a mine over the years, such as royalties, permits and community costs.
The "all-in" costs have, on average, soared by 17% a year over the past five years. This has been largely driven by falling grades of gold deposits mined. If unchecked, Georges Lequime of Earth Resource Group says, "all-in" costs will be $2,000 an ounce within a decade.
If gold prices are weak, that is clearly an unsustainable trend.
Across the industry, the average "all-in" cost is now around $1,200 an ounce. So it is easy to understand why holding that level in the gold price is so important to gold mining firms.
As Money Morning Chief Investment Strategist Keith Fitz-Gerald has noted, when investing in gold miners, you must look for low costs of getting gold out of the ground.
"Miners can be extremely problematic, so exercise caution," Fitz-Gerald says. "But to me the single biggest question is, do they have experienced management and can they get gold out of the ground cheaper than they can sell it?"
"All-In" Best and Worst
With "all-in" costs soaring, it is easy to see why investors need to find the companies with management able to bring that cost under control.
James Brumley of InvestorPlace did some of the legwork for investors.
He found that among the biggest gold miners, the three companies with the lowest "all-in" cost per ounce were: Yamana Gold (NYSE: AUY) at $856 an ounce, Barrick Gold at $919 an ounce, and Kinross Gold (NYSE: KGC) at $1,038 per ounce.
Other companies aren't doing quite as well. Gold Fields "all-in cost" is $1,290 an ounce, and Iamgold (NYSE: IAG) expects costs at somewhere between $1,200 and $1,300 per ounce. Newmont's cost is a bit above $1,100 an ounce.
Of course, the "all-in" cost should not be the sole consideration when looking at investing in a gold mining company. But it is a good starting point.
For more information on how to invest in gold miners, check out this recent Private Briefing article on the gold miner that Wall Street loves... and why investors should take note.
The Best Sector to Invest in Now
Barrick Takes Writedown, Cuts Dividend as Gold Declines
Newmont Mining Takes $2 Billion Writedown as Gold Prices Drop
ETF Securities: Gold Miners De-Rating Done or More to Come?
Gold's Bounce Inches Some Miners Back to Profitability
Gold Miners: The Men Are Being Separated From the Boys
Gold Company Costs Could Hit $2,000 Within 10 Years