Image source: Barrick Gold.

Barrick Gold's (GOLD -1.02%) business prospects have been looking a lot better, now that precious-metals prices have been heading higher. Alcoa Inc.'s (AA) aluminum business, on the other hand, is still languishing. If you pitted Alcoa Inc. against Barrick Gold, you might think the answer was easy based on the metals they mine. But it could be more difficult than that.

Here's why.  

Commodity issues

Both Barrick and Alcoa are in commodity businesses. There's no way around the impact that weak commodity prices can have on their top and bottom lines. That leaves cutting costs as the best way to deal with a tough spell. Both have been working hard on that front since the commodity markets peaked in 2011.   

Image source: Barrick Gold.

For example, Barrick has been focusing on reducing its all-in sustaining costs, the amount of money it costs to pull an ounce of gold out of the ground. In 2014, its all-in sustaining costs were $864 an ounce, already toward the low end of the industry. Last year that number dropped to $831, and the company thinks it could get its costs down to as low as $725. Alcoa, meanwhile, closed, curtailed, or sold 36% of its refining and 43% of its smelting capacity between 2008 and 2016. That helped improve its position on the production cost curve from the 31st percentile to the 23rd on alumina and from the 58th to 43rd in aluminum.   

But here's where things go in different directions. Alcoa's aluminum markets remain relatively weak because of oversupply issues. Gold, Barrick's focus, has gone on a huge rally this year. That helps explain why Barrick's shares are up around 200% over the year to date period while Alcoa's shares are up just 6%. Without question, if you think gold has more room to run, Barrick is the stock for you. But if you're willing to take a deeper dive, Alcoa might have a lot more appeal.

A free company?

At this point, Barrick is no longer out of favor and its price will go up and down with the price of gold. So it's no longer a contrarian bet on a beaten-down gold sector; it's a bet that the gold rally isn't going to end -- watch out if it does, of course. Alcoa, however, is still feeling the pinch of the aluminum malaise.

The thing is, it's been doing more than just cutting costs. For starters, Alcoa has been building up its specialty-parts businesses via acquisitions such as airplane-part specialists Firth Rixon and RTI International. These are value-added business that can charge premium prices relative to the commodity aluminum side of the business. And, more to the point, the specialty-parts segment is now large enough that Alcoa is splitting into two companies: Alcoa will continue to own the commodity aluminum businesses, and Arconic will take the specialty-parts businesses.   

Image source: Alcoa.

And this is where things get really interesting. Berkshire Hathaway (BRK.B -0.68%) recently purchased specialty-parts maker Precision Castparts for roughly three times revenues. Based on that purchase and Alcoa's roughly $13.7 billion market cap, it appears investors could be getting old Alcoa for free in the planned split. If you take Arconic's second-quarter revenue of $3.5 billion as a run rate, this soon-to-be-spun-off division would generate roughly $15 billion in sales over a year. Alcoa's market cap is below that run rate, let alone the three-times sales figure that Berkshire paid for a similar company.

But here's the interesting thing. The $15 billion run rate doesn't include any of the revenue the Alcoa aluminum business generates. In other words, if you use Berkshire's Precision Castparts acquisition as a benchmark, buying Alcoa today, before it splits in two, means getting a potentially good deal on the specialty-parts business and an aluminum business for, well, free. The sum of the parts certainly looks as if it could be worth more than the whole at Alcoa.

Digging deep

If you're pitting Barrick against Alcoa, there's no question that it's easier to see the good news in the gold market and how exciting that is for Barrick. But at this point, Barrick's stock price is being driven by the price of gold. Any further stock advances are likely to require even higher gold prices. And if gold prices falter, well, it would be bad for Barrick.

Alcoa, on the other hand, remains unloved -- so much so that it looks as if investors could be pricing the soon-to-be-broken-up company well below what similar companies have fetched in the acquisition market. For a contrarian, buying Alcoa today could mean getting an underpriced specialty-parts business (Arconic) and an aluminum company for free.

In the end, this story is about more than just metals prices. Alcoa looks a lot more interesting than Barrick.