Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Shares in Kraft Heinz are expected to plunge when markets open Friday, after the consumer goods company said it was being investigated by U.S. regulators and it reported a massive loss.

Shares in the food company slumped 20 percent late on Thursday after it posted a quarterly loss, disclosed an SEC investigation, and wrote down the value of its iconic Kraft and Oscar Mayer brands as it highlighted the tough environment for the packaged food industry.

The gloomy results and forecast from the company, which is one of billionaire Warren Buffett's largest investments, reflect changes in consumer trends away from processed foods to healthier alternatives.

The after-hours slump erased $12 billion from Kraft Heinz's stock market value and left its shares trading at their lowest point since H.J. Heinz Co bought Kraft Foods Group in 2015, to create the world's fifth-largest food and beverage company.

"Kraft Heinz results confirmed all our worst fears — plus more," Guggenheim Partners' analyst Laurent Grandet said in a note.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The $15.4 billion write-down indicates declining fortunes of the iconic brands and other losses in asset value, meaning the company views those assets as less valuable than before the merger.

"We expect to take a step backwards in 2019," Chief Financial Officer David Knopf told analysts on a post earnings conference call, promising "consistent profit growth" starting in 2020.

Kraft, which owns Velveeta cheese and Heinz ketchup brands, forecast adjusted earnings before interest, tax, depreciation and amortization between $6.3 billion and $6.5 billion in 2019, lower than analysts' estimates of $7.47 billion, according to Refinitiv.

On a post-earnings call with analysts, Chief Executive Officer Bernardo Hees said the entire packaged foods industry will likely remain challenged, blaming the rising popularity of private label brands and higher commodity costs.

"Kraft Heinz is in a worse position than many other consumer packaged goods companies because it has got a very weak portfolio of brands. They are not delivering the level of growth that's needed in this sort of market," GlobalData Retail managing director Neil Saunders said.

Buffett's Berkshire Hathaway Inc and Brazil's 3G Capital control Chicago-based Kraft Heinz.

In addition to lower-than-expected earnings, the company disclosed it had been subpoenaed by the U.S. Securities and Exchange Commission in October, related to an investigation into its accounting policies, procedures and internal controls related to procurement.

The company said it was working on ways to improve its internal controls and determined the problems required it to record a $25 million increase to the cost of products sold.

"That has really made a bad set of results even worse because it has also thrown some uncertainty into the mix," Saunders said.