Commodities like gold and aluminum are out of favor today as weak demand and abundant supply throughout the commodity market have pushed prices into a deep downturn. This might have the contrarian investor in you looking for bargains. Alcoa (AA) and Barrick Gold (GOLD 1.64%) are two such companies worth a closer look, but which of these industry giants is the better buy?

Image source: Alcoa.

The metal matters
The first thing you'll want to consider with Barrick and Alcoa is the commodity. The first mines for precious metals like gold and silver and the other makes aluminum. This is a big difference in more ways than one. For example, investors appear to be increasingly concerned about risk today. In that environment, gold, considered a store of wealth, suddenly becomes a very desirable asset. Barrick Gold's shares will likely continue to follow gold prices higher.

That, however, is a very short-term trend. And it could switch the other way around pretty quickly, with gold prices falling and taking Barrick down with them. Note, too, that about half of the demand for gold comes from the economically sensitive jewelry trade -- not exactly a bastion of stability.

Image source: Barrick Gold

Alcoa's main product, aluminum, has an entirely different supply/demand picture. Aluminum is really an industrial metal prized for its light weight and strength. You don't buy aluminum because you get scared about the economic outlook (or because you think it looks pretty), you buy it because, for example, you need to improve gas mileage of cars and airplanes. That's an increasingly important trend.

So, from a long-term perspective, Alcoa and its aluminum focus probably has a better outlook on the demand front. That's particularly true as aluminum displaces heavier steel in many applications. But, over the short term, Barrick Gold would appear to have the edge as gold prices can move quickly up and down based on nothing other than investor sentiment.

ABX Chart

ABX data by YCharts.

Sum of the parts?
Another thing to consider here is: What are you getting today? Shares of Barrick and Alcoa have both taken a beating over the last few years. Results at each company have been hit by things like cost cutting and asset impairment charges, as well as low selling prices. Investors have noticed the poor results and sent the shares tumbling. But the end goal of all the corporate activity is to "right size" the businesses to the current market environment.

However, Alcoa has been doing something else along the way that Barrick hasn't. The aluminum giant has, indeed, been shrinking its aluminum production footprint, but it has also been growing its metal fabricating business along the way. This segment, which the company calls its value-add business, makes things like aerospace parts out of aluminum and other metals. In fact, Alcoa is looking to break in two later this year by spinning off the value add business to shareholders, now that it's large enough to stand on its own. Barrick just mines gold and is, thus, totally reliant on gold prices for its future.

But so what? Alcoa had revenue of around $22.5 billion in 2015 and its market cap has recently been in the $10 billion range. In other words, it's trading for less than half of sales. In and of itself this isn't so interesting. But now compare that fact to Berkshire Hathaway's (BRK.B -0.01%) (BRK.A -0.34%) acquisition of Precision Castparts for more than 3 times revenue. Precision Castparts makes high-tech parts like Alcoa's value-add business. Now that's interesting.

Alcoa's value-add business alone had revenue of $13.5 billion in 2015. So you could argue that you are buying the value-add business on sale relative to what Warren Buffett paid for Precision and you'll wind up with the upstream business, with around $9 billion in revenue, essentially for free once the spin off is complete. If you buy Barrick, you just get Barrick and its mining operations.

An option for anyone's outlook
Clearly, the difference between Alcoa and Barrick comes down to your outlook. If you want a quick hit, Barrick is the much better option -- assuming gold prices are climbing. Aluminum just doesn't have the same safe-haven allure as gold. So if you think the world is about to go to hell in a hand basket, buy Barrick.

However, if you are looking for a longer-term opportunity, Alcoa appears to be the better option based on Berkshire's acquisition of Precision Castparts. And that gets all the more interesting when you consider that industrial demand for aluminum should continue to head higher over the long term because of the metal's light weight and strength. Gold just doesn't have the same dynamic backing long-term demand.