UBS and the Swiss government announced Friday that they had signed a loss protection agreement which will come into effect once the takeover of Credit Suisse is completed.