Cargo containers are shown at a port.

Canada’s economy shrank in the second quarter by a much larger degree than expected on an annualized basis as U.S. tariffs squeezed exports. But higher household and government spending cushioned some of the impact, data showed on Friday.