Venezuela's toxic economy has seeped into the filings of 13% of S&P 500 companies this year

The economic implosion of Venezuela and the plunge of its Bolivar currency is showing up in the bottom line of U.S. companies with interests in the South American nation.

At least 64 companies on the S&P 500 — about 13 percent of the total — informed investors through regulatory filings this year about write-offs or exposure stemming from the nation's tight grip on imports and exchange rates, according to a CNBC analysis.

Venezuela has long relied on profits from the country's state-owned oil company to support local social programs. When oil prices crashed in 2014, President Nicolas Maduro responded to budgetary shortfalls by printing money, instituting price controls and tightening access to U.S. dollars, stoking runaway inflation that is expected to top 1,600 percent in 2017.

Without basic goods like food and medicine, the country is facing drawn-out humanitarian and financial crises. U.S. companies have felt the squeeze as the once-lucrative market has collapsed, shutting down or writing off production facilities in the face of raw materials shortages and wild currency swings.

At least 10 major U.S. companies have opted to use a rare shift in their accounting rules to "deconsolidate" their Venezuela operations — removing those subsidiaries from their financial statements and effectively writing them off in one big charge. Those companies, which mentioned the country hundreds of times in 2016 filings, include PepsiCo ($1.4 billion), Mondelez ($778 million), Goodyear ($646 million) and Procter & Gamble ($2.1 billion).

For some companies, the decision to deconsolidate didn't just ding profits at the end of 2015, when many companies recorded those charges, but has continued to depress expected earnings in 2016. Others have shut down operations in Venezuela entirely: Minneapolis-based General Mills — which mentioned the country 65 times in the filings — finalized the sale in March of its Venezuelan division to Lengfeld Inc., a private investor. In a filing that month, the company forecast a loss on the sale of General Mills de Venezuela of around $35 million.

Home products firm Kimberly-Clark pulled out of Venezuela in 2016. As of the end of last year, the company deconsolidated its assets in the country and halted operations at its Caracas plant in July. The government quickly took the plant over and pledged to continue producing goods for locals. Industry experts said that would be impossible, however, because the raw materials are largely unavailable. The factory was later renamed for a local figure who is famous for fighting Spanish colonial rule in the 16th century.

Consumer staples companies were especially exposed: Nearly a third of companies in that sector mentioned the country in their 2016 10-Q filings so far, according to a CNBC analysis.

Other companies have continued to operate in Venezuela, marking down exchange rate losses and production issues as they come up. Coca Cola, for example, has written down about $132 million since the beginning of 2015 and has warned that future write-downs are also possible if the situation continues to worsen. The company slowed production in a few markets due to sugar shortages.

"The most extreme example perhaps is Venezuela, where there was no sugar," President and COO James Quincey said in a July conference call. "We've actually doubled down on really driving Coke with zero sugar in Venezuela with a kind of full red One Brand look."

Kellogg said that currency swings cut the company's operating profits by $132 million last year and could cut 10 cents off earnings per share in 2016, with much of that impact coming from Venezuela.

Some oil field services companies, like Schlumberger and Halliburton, remain in the country, but have curtailed their operations due to late payments.

In July, Halliburton reported that it had taken a $148-million writedown in accepting a promissory note for unpaid invoices from its "primary customer in Venezuela." The filing did not specify that customer by name, but state-owned PDVSA is the only company that operates in Venezuelan oil fields, according to Reuters. In an October note, analysts from Nomura said Halliburton had received its first cash interest payment on that promissory note.

Simply mentioning Venezuela in a filing is a sign of exposure to the country, which has had a measurable impact on stock prices. As a group, companies that mentioned the country at least once in their 2016 earnings have underperformed the S&P 500 index by a wide margin.

Over the past five years, that index would have underperformed the S&P 500 by 37 percentage points.