Macaulay Duration Calculation on LIBOR/Swap term structures

I'm a bit confused as to how to use the Macaulay Duration Calculation method to calculate the duration of a swap in which the rates for both paying and fixed change every six months (LIBOR/Swap Term Structure). What I've done already is calculate it like this:

Find the Cash Flows of each periodic payments (so I haven't done this for receiving cash flows), then find the PV using discount factors then find the weight (PV/NPV) and then multiplied the weights with the time and the total would be the duration - I don't know if this is correct.

Thank you in advance.

• Hint: What is the duration of floating rate bond? Doesn't this look like the fixed leg or your swap? Also, I don't think the fixed rate of your swap is changing every six months. What is the duration of a fixed rate bond? What is the duration of a combination or portfolio of bonds? – AlRacoon May 9 at 12:38
• @AlRacoon the duration I've calculate is the total weight x time (weight is calculated in this case as pv/npv) of each coupon payment. Can you use Macaulays method for a floating rate bond? Also so if I have: Term(years) 0.5, 1, and 1 and different rates for each term is that not the rate of my swap changing? – Jack Jock May 9 at 13:30
• Would the duration of the swap in this case be: duration of asset (receiving payments) - duration of liability (paying) – Jack Jock May 9 at 13:37
• You are correct in your Macaulay calculation. It can be applied to floating as well, but unnecessary in that your forecast of floating payments from the yield curve will be discounted by the same rate. The fixed rate should be the same for the entire term of the swap (hence the term fixed). And yes, the duration calc of the swap is the difference as you are long one leg and short the other. – AlRacoon May 9 at 13:46
• @AlRacoon Do you have discord by any chance? Thank you so much for your reply I'm still just a bit confused – Jack Jock May 9 at 13:51