The Swiss bank UBS reported a net profit of 1.2 billion Swiss francs ($1.25 billion) for the whole of 2017, weighed down by a writedown in the fourth quarter that related to the new U.S. tax overhaul.