Billionaire investors such as Warren Buffett, Carl Icahn, and George Soros have minted themselves a fortune by staying one step ahead of the markets. That's why we Fools like to dig through SEC filings each quarter to see what these brilliant investors have been buying or selling recently. 

After digging through those filings, our team of Fool contributors noticed that these investors have been selling off their positions in Barrick Gold (GOLD 0.27%), Transocean (RIG -2.14%), Seadrill Ltd. (SDRL), Facebook (META 3.44%), and Wal-Mart (WMT 0.49%). Is it a good idea to follow suit?

Two traders pointing at computer screens.

Image source: Getty Images.

Looking for riches under the sea

Dan Caplinger (Transocean): The offshore-drilling industry has been a tough place to make money lately, and many investors have started to lose faith in Transocean and its peers. Late last year, well-known activist investor and billionaire Carl Icahn slashed his position in Transocean, citing the need to take tax losses but also having suffered a dramatic decline in the value of the stock since his initial investment.

Transocean and offshore drillers in general have been among the hardest hit in the industry, largely because the projects that rely on the company's drilling rigs tend to be more expensive than land-based exploration activity. When oil prices were above $100 per barrel, the higher potential reward made offshore drilling worth the effort, and that helped push demand for drilling equipment much higher. Yet when the energy market went into the tank, Transocean found itself with clients who no longer wanted to move full steam ahead on expensive offshore projects. In the aftermath, gluts of equipment have contributed to lower contract rates.

Currently, Transocean is at a turning point. Current oil prices have rebounded somewhat, but they still aren't high enough to justify a return to full capacity. If oil rises further, then Transocean is in a position to recover its losses. But if oil sags, it could spell a long-term problem for Transocean and its growth prospects. 

Does gold still glitter?

Rich Duprey (Barrick Gold): Considering his track record lately, investors might not want to follow the moves billionaire investor George Soros is making these days, but he's not a billionaire for nothing.

Soros Fund Management reportedly lost $1 billion betting against a market rally following Donald Trump's election and in the fourth quarter dumped all of its holdings in Barrick Gold, only to see shares of the miner surge this year. While it had jumped as much as 50% between its mid-December lows and the peak it hit mid-February, it's eased back a bit since, and investors should consider which way it will go from here. After all, Soros' biggest sin may have been simply selling too early -- but if we look at Barrick Gold's bigger picture, I'd say no, don't follow Soros' lead here.

In its fourth-quarter earnings report last month, the gold miner reduced its all-in sustaining costs (AISC) to just $732 per ounce, or 40% below gold's current price. It shows that the cost-cutting initiatives Barrick has implemented are bearing fruit, and the gains are expected to accelerate this year, with AISC falling even further.

The gold miner has paid off a good chunk of its long-term debt, and though it still carries some $8 billion worth on its balance sheet, there isn't much coming due anytime soon. Moreover, Barrick owns five core mines that should produce 70% of its volumes this year, with ore grades that are more than double that of the miner's peer group. It also expects to produce some 5.9 million ounces this year, or 5% more than in 2016.

There's good reason to keep betting on gold generally and Barrick Gold in particular, and following George Soros in dumping your shares might just tarnish your portfolio.

Giving the thumbs-down to this social network

Brian Feroldi (Facebook): With a net worth of roughly $13 billion, Steven Cohen is one of the most successful hedge fund managers in the world. That's why it caught my attention when I found out that Point72 Asset Management -- one of Cohen's hedge funds -- dumped 96% of his position in Facebook in the fourth quarter. 

If you look at the numbers, you might be scratching your head as to why Cohen would want to give up on Facebook right now. Last quarter, Facebook's revenue surged 51% while expenses grew by only 29%. The difference caused margins to balloon and allowed EPS to more than double. Those are impressive figures for any company, let alone a megacap like Facebook.

Beyond the financials, Facebook's community also continues to thrive. The company welcomes 1.86 billion unique visitors a month, up 17% from the year-ago period. What's even more amazing is that 1.23 billion users interact with the site every day. That's telling about how much value users get from the site. 

Given those terrific results, my hunch is that Cohen is worried that Facebook's revenue is going to significantly decelerate in the years ahead. That's a legitimate concern now that the company's ad load is leveling off. Furthermore, expenses are expected to continue to rise significantly as the company adds engineering talent. That could lead to a meaningful slowdown in profits. With shares trading near an all-time high, perhaps he wanted to cash in his chips while he could. 

Regardless of Cohen's move, I for one couldn't be more excited about Facebook's long-term potential. That's why I have no intentions to part ways with my shares anytime soon.

Big investors selling this troubled offshore driller (and you probably should, too) 

Jason Hall (Seadrill Ltd.): After the company disclosed in its most recent quarterly earnings filing that Chapter 11 bankruptcy is on the table, investors of every ilk -- not just billionaires -- have been selling off shares of Seadrill. And for good reason, since the company is facing more than $1 billion in debt it must pay off between now and June, with hundreds of millions of it maturing at the end of April. 

As things stand today, the writing's on the wall that the company won't pay off that first debt maturity, which would put it in default on essentially all of its long-term debt soon after. 

Should you follow the rest of Seadrill's investors to the exits? Probably, yes, if you have capital at risk that you really can't afford to lose. The offshore-drilling industry remains an awful business right now. Offshore oil and gas producers are on track to spend less capital this year than anytime in the past decade-plus. 

There's still a chance that Seadrill can turn things around and come to terms with its debt holders, in which case today's price will end up being a bargain. If you're willing to take on that risk -- and acknowledge you could end up with nothing -- there's a case for staying invested. Just don't be shocked if it doesn't work out. 

Another sign of retail doom

Jordan Wathen (Wal-Mart): Warren Buffett's holding company, Berkshire Hathaway, nearly blew out of its billion-dollar position in Wal-Mart in the most recent quarter. And while Wal-Mart may have been a small part of Berkshire's portfolio, few likely know more about Wal-Mart than Warren Buffett does.

In May 2003, Berkshire Hathaway acquired a little-known Wal-Mart subsidiary known as McLane Company, a distributor of groceries and foods to stores all around the country. Shortly after that acquisition, in 2005, Berkshire purchased shares of Wal-Mart, perhaps having learned to appreciate the retailer's operations after observing it through McLane Company.

More than a decade after Berkshire's investment, Buffett apparently wants out.

Wal-Mart finds itself situated between fierce competition in grocery and general merchandise. In grocery, competitors such as Aldi, which has quietly opened more than 1,600 stores in the U.S., many of which are located in proximity to Wal-Mart stores, competes directly on price for core grocery items including milk and produce. In general merchandise, online stores such as Amazon.com have the lead in distribution and can deliver products directly to their customers' doors, often at a better price.

Buffett has shared his praise for Amazon's CEO, Jeff Bezos, telling CNBC last May, "We haven't seen many businessmen like him." Keep in mind that Berkshire is awash in cash and prefers to leave gains unharvested rather than collect its winnings and pay taxes. That Berkshire is reassessing its stake in Wal-Mart should give shareholders pause about the company, and retail in general.