Gold and silver prices have been trending higher in recent weeks, and that is bringing investors back into the mining space.

Let’s take a look at Silver Wheaton Corp. (TSX:SLW)(NYSE:SLW) and Goldcorp Inc. (TSX:G)(NYSE:GG) to see if one is a better bet.

Silver Wheaton

Silver Wheaton is an odd duck in the gold and silver sector. The company doesn’t actually own any mines; it simply provides mining companies with upfront cash in exchange for the right to purchase discounted gold and silver produced at a mine.

Why would miners do this?

Mining is a capital-intensive business, and accessing cash during low points in the cycle can be difficult and expensive. Silver Wheaton provides an alternative to borrowing funds or raising cash through an equity sale.

Most of Silver Wheaton’s streaming deals are negotiated on mines that primarily produce base metals such as copper and zinc. By selling the gold and silver by-product, the mining company secures the funds needed to develop the mine.

Silver Wheaton has taken advantage of the downturn in the base metals market to secure new production. At the same time, output on previous deals continues to increase. Production hit a record 11 million silver equivalent ounces in Q3 2015 and full-year output was expected to be about 44.5 million ounces. Management believes that number will rise to 55 million ounces by 2019.

Silver is a key input for the production of solar panels. With demand expected to rise in the coming years, silver prices could turn the corner very quickly.

Goldcorp

Goldcorp has really taken a beating in the past four years, and many of the company’s fans have given up on the stock, but there is reason to believe better days could be ahead.

Two new mines went into commercial production in 2015 and output is rising just as gold prices appear to be finding a bottom. Production in Q3 2015 hit a record 922,200 ounces, a 42% increase over the same period in 2014. Full-year output was expected to be near the high point of guidance for 3.3-3.6 million ounces.

As the new mines ramp up to capacity, operating costs are coming down. All-in sustaining costs for Q3 2015 dropped to US$848 per ounce from US$1,066 per ounce the previous year.

The company generated a healthy US$243 million in free cash flow in the third quarter, and that number could surge this year as capital expenditures drop and gold prices improve.

Which should you buy?

Silver Wheaton is a great way to play a rebound in both gold and silver without taking on the risks associated with operating mines. If you want the safer option, this is the better pick.

If you think gold is definitely headed higher, Goldcorp might be the way to go. The company produces more than three million ounces per year, which means every US$100 increase in the average price of gold adds at least US$300 million in extra revenue. With costs falling and production rising, the stage is set for some pretty good numbers, and the stock could move significantly higher if the gold rally is here to stay.

Just released! One top stock for 2016 and beyond

Exports of liquefied natural gas could be one of the best growth opportunities out there for long-term investors. And, we think we've identified the Canadian company to invest in. It's a global company with operations across nearly 20 countries and 70 locations. We like it so much, we've named it as 1 Top Stock for 2016 and Beyond. To find out why, click here now to learn how to access your FREE copy today!

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. The Motley Fool owns shares of Silver Wheaton. (USA). Silver Wheaton is a recommendation of Stock Advisor Canada.