Accrual in Default Derivation of Credit CDS Curve

In Trading Credit Curves Part I by JP Morgan we have that each point on a credit (CDS) curve represents:

$$PV(\text{Fee Leg}) = PV(\text{Contingent Leg})$$

which is

$$S_n \sum_{i=1}^{n}\Delta_i PS_i DF_i + \text{Accrual on Default} = (1-R)\sum_{i=1}^{n}(Ps(i-1)-Psi)DF_i$$

where the accrual on Default is $S_n \sum_{i=1}^{n}\frac{\Delta i}{2}(Ps(i-1)-Psi)DF_i$

where $S_n$ is the spread for protection to period n, $\Delta_i$ is the length of time period i in years, $PSi$ is the probability of survival to time t, $DFi$ is the risk free discount factor to time i, $R$ is the recovery rate on default

I cannot understand why the accrual on default bit is there and i cannot see how it has been derived and the reasoning behind it. I really dont see why you dont just sum to time n when there is a default and discount that? I dont understand why we need the $\Delta_i$ in the first term on the LHS as it seems superfluous.

I suppose really I dont understand the LHS of the equation derivation at all.

The formula for the accrual on default $$S_n \sum_{i=1}^n \frac{\Delta_i}{2}(Ps(i-1)-Ps(i))DF_i$$ is just an approximation that says conditional on default occurring within period $i$ (probability of $Ps(i-1)-Ps(i)$), defaults occurs on average in the middle of the period, thus the $\frac{\Delta_i}{2}$ average accrual time from beginning of period to default.
• Ok thanks, yeah i understand this now, but I dont see why we need the $\Delta_i$ in the LHS??? – Permian Feb 8 '18 at 9:24
• $S_n \Delta_i$ is the fixed leg coupon paid on a full period ($S_n$ is a rate, not an amount). – Antoine Conze Feb 8 '18 at 9:31