Caterpillar has best year ever but tariffs weigh on profits