These are some WIP notes on credit derivatives.
Contents 

Fundamentals 
Notation Table 
Discount Curves 
Short Rates 
Discount processes 
Annuities 
Credit Events 
Risky Annuties 
Hazard Rates 
Insurance Payments 
Fundamentals
Notation Table
Notation  Meaning 

$\mathcal F$  filtration 
$Z(t,T)$  discount curve 
$r(t)$  short rate process 
$D(t)$  discount process 
$\Gamma(t)$  annuity process 
$A(t)$  annuity valuation process 
$\tau$  credit event 
$Q(t,T)$  survival curve 
$\lambda(t)$  hazard rate process 
$\hat Z (t,T)$  risky discount curve 
$\hat A (t)$  risky annuity valuation process 
Assume that all stochastic processes, unless otherwise specified, are adapted to some common filtration $\mathcal F$.
Discount Curves
Consider a hypothetical bond maturing at time $t$ (the maturity or tenor) having the following properties:
 UnitNotional
 At time $t$ the bond holder will be paid one unit of currency. This payment is the notional.
 ZeroCoupon
 No payments to the bond holder will be made before time $T$ (otherwise, such payments are called coupons).
 Risk Free
 The notional is guaranteed to be paid in full and on time.
Denote the fair value of this bond ascertained at time $s$ as $Z(s,t)$. The bitemporal function $Z$ is called the (riskfree) discount curve. It represents the market demand for money.
Some assumed propeties for all real values $t\geq s$ and $h$:
 For fixed $s$, $s\mapsto Z(s,t)$ is a stochastic process with respect to the filtration $\mathcal{F}_s$.
 $Z(s,t) > 0$
 $Z(s,t+h)=Z(s,t)\mathbb{E}[Z(t,t+h)\mathcal F_s]$
We can deduce from the above properties that $Z(t,t)=1$. This is because, applying the second property: $Z(t,t)=Z(t,t+0)=Z(t,t)Z(t,t+0)=Z(t,t)^2$.
Short Rates
Let us additionally assume that $t \mapsto Z(s,t)$ is smooth.
Define $Z'$ as the derivative of $Z$ with respect to its second argument. That is, $Z'(smt)=\frac{\partial Z(s,t)}{\partial t}$. Then
Consequently,
Here, $r(t)=Z'(t,t)$ is the short rate process. It can be thought of as the "instanteous" interest rate at time $t$.
That is, the interest rate of a zero coupon bond during the period $(s,t)$ is as follows:
Taking the limit $s\to t$ would then yield $r(t)$.
Discount processes
The discount process corresponding to the short rate process $r(t)$ is defined as
With this notation, the discount curve may be written as
Annuities
An annuity $\Gamma$ is a schedule of future payments. Denote $\Gamma (t)$ as the total payments up to time $t$. $\Gamma$ may be modeled as either a deterministic function or a stochastic process.
Assuming zero risk, the (forwardlooking) fair value of this annuity at time $t$ is defined as the following RiemannStieltjes integral:
 Discrete Case

Consider an annuity consisting of discrete payments
$\gamma_1,\ldots,\gamma_N$ at times $t_1,\ldots,t_N$. Then
$A(t) = \sum_{n=1}^{N} \gamma_n Z(t,t_n)I(t>t_n),$where $I$ is the indicator variable.
 Smooth Case

Suppose that $\Gamma$ is smooth. And define $\gamma(t) = \Gamma' (t)$
as the annuity rate. Then
$A(t) = \int_t^\infty Z(t,s)\gamma (s) ds.$
Credit Events
A credit event is a contractuallyobligated event wherein a debt security (e.g. a bond) has been determined to not be fully honored.
Mathematically, a credit event $\tau$ is a stopping time. That is, a random variable representing some point in time.
It's distribution can be described the the survival curve:
This is the probability ascertained at time $t$ that a credit event will not occur before or during time $T$.
Risky Annuties
Consider an annuity $\Lambda (t)$ that is risky. That is, scheduled payment occuring at or after a credit event $\tau$ are unrealized. The forwardlooking fair value of this annuity is given by the risky value process:
Hazard Rates
The hazard rate $\lambda (t)$ is the instanteous likelihood that a credit event will occur at time $t$. Mathematically, it is a stochastic process $\lambda$ defined by:
Intuitively, $\lambda(t) dt$ is the likelihood that a credit event will occur between times $t$ and $t+dt$.
Equivalently, the survival curve may be derived from an a priori defined hazard rate:
The relationship between $\lambda$ and $Q$ is analogous to that of $r$ and $Z$.
Insurance Payments
Consider a payment of one unit of currency paid out at time $\tau$ if $\tau < T$ for some tenor $T$. This is a form of insurance. And it's value at time $t$ is given by
The RiemannStieltjes integral on the left side of the above equation is with respect to the parameter $s$.