China’s terrible, no good, very bad year is finally drawing to a close. Next year is set to start off better, but there are some nasty icebergs lurking beneath apparently calmer waters.

Investors could find opportunities in trade-exposed equities, like Foxconn. But the risk of serious financial turbulence, which they barely avoided in 2019, is rising.

Though most investors didn’t notice, key sections of China’s economy were already on the mend by late 2019, particularly the auto sector—which was mired in a deep downturn for most of 2018 and 2019—and the electronics industry. Auto output rose on the year in November for the first time since June 2018. And electronics makers’ profits have also rebounded strongly in recent months as global smartphone and semiconductor sales have begun to rise again.

In addition, the trade detente with the U.S. reached this month should help ensure some the healing of the labor market, already under way thanks to the electronics rebound.

In two other key parts of the economy, things look far less rosy. Real estate profit growth is slowing rapidly—along with the housing market itself. That, in turn, is putting pressure on state-owned industrial companies, which are concentrated in construction-dependent sectors like steel. Real estate and government-owned industry, along with infrastructure, also happen to be the sectors where China’s debt burden is heaviest.