Despite strong consumer data, rail freight is in a steep decline in the United States.

Railroads across the board posted disappointing earnings, as volumes continue to fall.

Cheap trucking rates have siphoned some shipments, but President Trump's trade war isn't helping anything.

Moody's on Friday lowered its rating for the sector to negative from stable.

Visit Business Insider's homepage for more stories.

The amount of freight shipped by railroad has declined for months thanks to cheap trucking rates and President Donald Trump's trade war and there doesn't seem to be much light at the end of the tunnel.

After disappointing results by nearly every major freight railroad for the third quarter earlier in October, there's more bad news on the horizon, says Moody's.

Freight volumes across the board are likely to fall through 2020, the credit ratings agency said on Friday, lowering its outlook to negative from stable.

"Coal shipments fell 9% over the last three months, a decline we expect to accelerate to the low teens in 2020," Moody's said. "Absent a substantial federal policy shift, technological innovations or a significant and sustained increase in natural gas prices, none of which are likely, demand for thermal coal from US utilities is subject to a secular decline of on average about 7% per year over the next 10 years."

Intermodal, a big segment that has seen an outpouring to trucks, isn't set to fare any better.

"The continuing decline in intermodal shipments is at odds with a moderately growing economy and still healthy consumer data," Moody's said. "But high inventory levels, heightened competition from truck carriers and lane rationalizations weigh on shipments of intermodal freight."

In its third-quarter earnings call, Union Pacific, the nation's largest railroad, didn't directly name Trump — but said the economy wasn't doing the railroad any favors.

"The economy is what the economy is," Robert Knight, the railroad's chief financial officer, said. "We deal with the hand that we're dealt and we don't use that as an excuse."

CSX's CEO echoed his concerns, and called the economy puzzling.

"Both global and U.S. economic conditions have been unusual this year, to say the least, and have impacted our volumes," Jim Foote, who's worked in the industry for decades, said on a conference call. "The present economic backdrop is one of the most puzzling I have experienced in my career."

There's one odd sticking point: consumers.

Consumer spending has remained strong, despite the struggles from tariffs, especially on Chinese goods.

"The continuing decline in intermodal shipments is at odds with a moderately growing economy and still healthy consumer data, including robust retail sales growth (see Exhibit 6), a low unemployment rate and high - albeit somewhat more cautious - consumer confidence," Moody's said. "Positive consumer data underpin intermodal shipments because intermodal freight largely contains consumer-related freight."

Might that glimmer of hope save the sector? Not likely, says Baird analyst Ben Hartford.

"What's quite clear is that we're not yet at a trough -- trains have not yet bottomed," he said in October. "We need to have some clarity in trade policy."