Warren Buffett. Image source: The Motley Fool. 

Warren Buffett's Berkshire Hathaway (BRK.A 0.43%) (BRK.B 0.47%) has been unloading its position in Wal-Mart (WMT -0.84%) for more than a year. But in the third quarter of 2016, its selling accelerated as it dumped 70% of its remaining stake, or about $2 billion.

Though Buffett has pooh-poohed technology through his career, the Oracle of Omaha conceded at Berkshire's shareholder meeting last year that brick-and-mortar retailers would have trouble keeping up with Amazon.com (AMZN 2.29%).

At the conference, Buffett called Amazon founder Jeff Bezos a "genius," saying, "We haven't seen many businessmen like him. "Overwhelmingly, he's taken things you and I've been buying and he's figured out a way to make us happier buying those products, either by fast delivery or prices or whatever it may be, and that's remarkable."

That conclusion has likely led Berkshire to shed its stake in Wal-Mart in recent quarters as it is squarely in Amazon's path. Berkshire may have dumped more Wal-Mart shares in the fourth quarter of 2016.

Wal-Mart at a crossroads

It's never good when Buffett, probably the most respected investor of all time, is selling your stock. A look at Wal-Mart's performance also may explain why he sold, especially compared to Amazon, which has been the best-performing stock in the last 20 years.

WMT Chart

WMT data by YCharts.

But as savvy investors know, past performance is not a guarantee of future returns.

Wal-Mart today is at a crossroads. CEO Doug McMillon has taken several steps to revamp the company since taking the helm three years ago. He's raised the base wage to $10 per hour, streamlined the promotion process, and made cleaning up stores and customer service a priority. The company has also invested billions in e-commerce, opening hundreds of grocery pick-up kiosks, and acquiring start-up Jet.com for $3.3 billion.

Brick-and-mortar retailers got hammered over the holiday season, but Wal-Mart has not reported holiday sales. The retail giant is also coming off eight straight quarters of comparable sales growth, a sign it's outperforming the broader retail industry.

Because of its investments in higher wages and e-commerce, the company is expecting profits to fall in fiscal 2017, which ends this month, then be flat during fiscal 2018, and return to growth in fiscal 2019. In other words, investors will need to be patient as the company continues to invest.

What's a shareholder to do

Wal-Mart investors should know what to expect from such a stock. It's a defensive dividend payer that has steadily increased its dividends for 43 years in a row, making it a Dividend Aristocrat. Unlike a volatile stock like Amazon, which has the potential to blockbuster returns but also put up significant losses, Wal-Mart will be a stable slow-growth investment. The stock is unlikely to significantly outperform the market, especially given the challenges in retail and the investments it's making. The nature of the company's business as a low-cost provider means that the stock is essentially recession-proof, and investors often flock to it when it looks like tough times are ahead. 

So the decision to sell Wal-Mart should probably be determined by your investing style. If you're a risk-averse investor looking for modest growth and a solid dividend yield at 3%, then Wal-Mart looks a like a good choice. If you're looking for higher potential growth, perhaps follow Buffett and dump Wal-Mart for a company whose profits are actually increasing.