Total Return Bond Index calculation using only Clean and Dirty prices

I have been looking at ways to construct a custom Total Return Bond Index given only the Clean and Dirty Prices. First I constructed the following, thinking that Price Index formula would capture coupon payments if I use Dirty Prices: The Price Index formula is: $$PI_t = PI_{t-1} \times \frac{{\sum} {P_{i, t} \times N_{i, t-1}}}{{\sum} {P_{i, t-1} \times N_{i, t-1}}}$$

There is no big difference between Price Index and Total Return Index. I expected that Total Return Index should be higher than Price Index as it collects the coupons of the bonds in the index. Then I figured that post coupon payment Dirty Prices go down significantly and thus the accrued interest is being swept away.

I tried to examine the following case:

• 1) A 6% fixed rate coupon bond with semi-annual payments;
• 2) Face Value is 1000;
• 3) Both Clean and Dirty prices are observable; Some details:

• The bond starts to trade at 1000;
• Post coupon payment dirty price(t-1) = clean price(t); dirty price(t) = clean price(t) + AI(t);
• Total Return: $$\mathrm{Total\ Return} = \frac{P_t + AI_t + C_t}{P_{t-1} + AI_{t-1}} - 1$$

So, there is a difference between the Total Return and Clean Price Return and I am assuming that I should include this while building my Total Return Index. I cannot think of a approach how to properly do this.

I have also looked at the difference between the Dirty Price and Clean Price and I can extract the accrued interest from there.

Any ideas how to solve this? I cannot use coupon payment dates as I have no info about them.

I think I finally got it. First I simply subtracted Clean Prices from Dirty Prices to get Accrued Interest. Then for each date where $\mathrm{AccruedInterest}_{t} < \mathrm{AccruedInterest}_{t-1}$ I did $\mathrm{DirtyPrice}_{t-1} = \mathrm{CleanPrice}_{t}$. The result is:  