This thesis is structured to research on a financial derivative asset known as a credit default swap (CDS). A CDS is a contract in which the buyer of protection makes a series of payments (often referred to as CDS spreads) to the protection seller and, in exchange, receives a payoff if a default event occurs. A default event can be defined in several ways, including failure to pay, restructuring or rescheduling of debt, credit event repudiation, moratorium and acceleration. The main motivation of my PhD thesis is to investigate the determinants of the changes of CDS spreads and to model the evolution of spreads. Two widely traded types are corporate and sovereign CDS contracts, the first has as its underlying asset a corporate bond and, hence, hedges against the default risk of a company; the second type hedges against the default risk of a sovereign country. The two contract types have different risk profiles; for example, it is known that liquidity premium with different maturity varies significantly for a corporate CDS but less so for a sovereign CDS because, in contrast with the corporate markets where a majority of the trading volume is concentrated on the 5-year CDS, the sovereign market has a more uniform trading volume across maturities. In light of the difference, this thesis is divided into four parts. Part A introduces the motivation and research questions of this thesis, followed by literature review on debt valuation, with emphasis on default and liquidity spreads modelling. Part B aims at the role liquidity risk plays in explaining the changes in corporate CDS spreads. Part C models sovereign CDS spreads with macro and latent factors in a no-arbitrage framework. Part D concludes this thesis with a list of limitations and further research direction.