Abstract
In this article, we study the counterparty risk on a credit default swap (CDS) and the valuation of a first-to-default basket swap on three underlyings under a common shock model with regime-switching intensities. We assume that the defaults of all the names are driven by some shock events, whose arrivals are governed by a multivariate regime-switching shot noise process. Based on some expressions for the joint Laplace transform of the regime-switching shot noise processes, we give explicit formulas for the spread of the CDS contract with and without counterparty risk and the spread of the first-to-default basket swap on the three underlyings.