The following formula gives the modified duration:
Modified duration=1+myMacaulay duration
where y is the yield and m is the compounding frequency per annum.
Macaulay duration is given by:
Macaulay Duration=Market Price of Bond∑(PV of Coupon Payments)×T
Price of the Bond = 1.0516+1.0526+1.053106=102.72
Macaulay Duration=102.721×1.0516+102.722×1.0526+102.723×1.053106=2.8359
Now, the modified duration is
Modified Duration=1.052.8359=2.7009
It's worth noting we have rearranged the Macaulay formula so that we have used:
Macaulay Duration=∑[Market Price of BondPV of Coupon Payments×T]=∑[Market Price of BondT×PV of Coupon Payment]