Before revision:  In this regard, the study of the risk of default of the counterparty in any financial contract has become crucial in the credit risk .
After revision:  In this paper we develop a semi-Markov approach to the study of the risk of default of the counterparty in any financial contract has become crucial in the credit risk .