There are 3 types of single name/indices trade
- New Deal
- Assignment
- Unwind
I covered new deals a while ago
http://www.noelwatson.com/blog/PermaLink,guid,90c9c561-95f0-46e5-a7a0-5030cdc07d60.aspx
but the logic is slightly more complex for assignments and unwinds
For single name, we have to use the following logic when calculating accrued coupon
If the original trade date is greater than a month before the last roll, we use the last roll date. If it is less than a month before the last roll date, we take the original trade date
So, taking some example, and assuming the effective date of the trade is 15/06/2007 (i.e. today is 14/06/2007)
- Original trade date is 07/05/2006
Here the trade is after the last roll (20/03/2007), so the accrued is calculated from then - 39 days

- Original trade date is 07/03/2007
The trade is within a month of the next roll date, so we assume a "long coupon" and calculate from original trade date - 100 days

- Original trade date is 07/03/2007
The trade is more than a month before the last roll date, so we calculate from the last roll date - 87 days

Indices are more simple, as you always pay the coupon from the last roll date, and all trades have a fee, as you are buying into a running contract.

Trade Examples.xls (190 KB)