Swiss bank UBS has reached an agreement with US housing agencies to settle claims it had mis-sold mortgage investments. UBS…