Gloomy economic news out of China and sliding oil prices weren’t enough to pull the TSX into the red today.

Chinese government trade data showed a drop in both exports and imports, a sign that U.S. tariffs are taking a toll on the world’s second largest economy.

The data sent global markets reeling.

However, the TSX managed to stay above level throughout the day, and was up 36 points at the final bell.

Seven of the exchange’s 11 sectors traded higher, including the heavyweight financials and energy sectors.

A rise in shares of Canadian mining company Goldcorp also factored into a green day on Bay Street.

Goldcorp was the second most actively traded company on the index behind Aurora Cannabis.

The Vancouver-based company jumped 7.5 percent to $13.83 a share after being acquired by U.S. mining giant Newmont Mining.

Newmont Mining and Goldcorp Inc. entered into a definitive agreement in which Newmont will acquire all of the outstanding common shares of Goldcorp in a stock-for-stock transaction valued at $10 billion.

The largest deal in the industry’s history will create the world’s largest gold miner.

In New York, uncertainty over U.S./China trade negotiations along with a drop in the tech sector and the U.S. government’s partial shutdown moving into a 24th day dragged the Dow, which lost 86 points.

A rift over border wall funding is the reason behind what has become the longest government shutdown in U.S. history.

Also pulling the index was concern over the U.S. corporate earnings season, which some analysts believe could fall below expectations.

The Nasdaq also backpedaled, slipping 65 points with losses by Apple, Micron, and Netflix pushing the index into the red.

Oil fell 89 cents to $50.70 US a barrel on weak Chinese trade data, despite ongoing supply cuts from the world’s biggest producers.

Meanwhile, the loonie held fairly steady against the greenback, edging 8/100ths of a cent lower to $0.7531 US, while gold moved up $2.40 to $1,291 an ounce.