After a rough go of it, two mining giants appear to have dug themselves out of trouble.
Two major players in the industry, BHP Billiton (bhp) and Anglo American (aauky) , reported stronger-than-expected earnings this week, thanks to rebounding commodities prices. BHP Billiton saw revenue roar back, with a profit of $3.2 billion for the second half of 2016, compared to a loss of $7.84 billion in the first half of the year. Anglo American, which is listed in London, reported a profit of $1.6 billion for the whole year, after taking a $5.6 billion loss the previous year.
The strong performances by the companies highlight the turnaround the mining industry has enjoyed over the last year. Over the previous few years, prices for commodities such as copper and iron ore had fallen so much that many industry players began taking cost-cutting measures, in anticipation of an extended period of financial hardship. Anglo American pledged to cut half of its employees, while BHP Billiton wrote down $11 billion in assets, in part to lessen its tax burden. (BHP also suffered financial losses related to a fatal dam disaster at an iron mine in Brazil.)
But since then, commodity prices have come back to life. The price of copper is up more than 30% over the last year, while iron ore jumped more than 80% in 2016. Thermal coal is up 66% over the last year. In response to the huge upswing, Anglo American scrapped part of its restructuring plan. The company had planned on jettisoning its coal and iron ore businesses to focus on copper, platinum, and diamonds, but thought better of the move once prices started to take off. Anglo American had also vowed to cut its 45 mining operations down to just 16, but it now expects that it will be able to keep about 30 of them.
For more on the stock market, watch this Fortune video.
The surge in demand can be linked to China, which has swallowed up large amounts of commodities since its government recently started an economic stimulus program. China consumes 40% of all copper mined, as well as huge quantities of iron ore and other commodities used for building, so any time demand from the country rises or falls, the effects are quickly felt.
Investors have taken notice. After hitting a low of $19.38 in late January last year, BHP Billiton’s stock has rebounded nicely, with shares of the company now trading at around $40. Anglo American’s London Stock Exchange listing is doing even better, jumping more than five-fold over the last year or so. But both stocks still trade far below their 2011 peaks, suggesting that they could have more room to run if the global economy keeps improving.
BHP Billiton did warn of potential problems down the road. Given the uncertainty of what President Trump has planned economically, the company forecast worldwide growth to be between 3% and 3.5% in 2017. Anything higher than that would be unlikely, the company said, due to the potential for a trade war. Trump has frequently talked about imposing tariffs on imports to the U.S., which would likely would be a drag on the global economy.