I am trying to see if momentum strategy has a profitability in a bond market. I have a bond dataset which is a panel data and it is monthly. It looks something like the table below.
For each month t, I am trying to form a 10 portfolio based on their return on t-3 to t-1 period. So each month there will be 10 portfolios p1(the loser) to p10(the winner) and I am going to but the winner and sell the loser and hold it for another 3 months (t+1 to t+3) and see if this gives profit.
But I just can't think of a good approach to implement this. I think it is complicated because each month I would have different portfolios. I don't know if my explanation was clear enough but any advice?