Solving bond duration I am supposed to calculate the following problem:
The Company issued 5,000 dollars voucher bonds with a half-year return of 100$ and a maturity of 8 years. Determine the duration of the bond if the normal annual yield of the probable bond is 6%.
I have tried to calculate it with the formula:
$$\frac{\sum_{i=1}^{15}\frac{150}{1,03^{i}}+\frac{150+5000}{1,03^{16}}.16}{\sum_{i=1}^{15}\frac{150}{1,03^{i}}+\frac{150+5000}{1,03^{16}}}$$
but it is not correct. 
Can anyone help me?
 A: With semiannual coupon payments the relationship between bond price and yield is given by
$$P = \sum_{j=1}^n C (1 + y/2)^{-j} + F(1+y/2)^{-n},$$
where $F$ is the face value redeemed at maturity, $C$ is the coupon amount paid semiannualy, $y$ is the yield, and $n$ is the number of coupon payments.
Modified duration is defined as
$$D = - \frac{1}{P} \frac{\partial P}{\partial y} = \frac{\sum_{j=1}^n j\frac{C}{2}(1 + y/2)^{-(j+1)} + n\frac{F}{2}(1+y/2)^{-(n+1)}}{\sum_{j=1}^n C (1 + y/2)^{-j} + F(1+y/2)^{-n}}$$
In this case compute duration using $C = 100$, $F = 5000$, $y = 0.06$, and $n = 16$.
You can also avoid working with the sums using a more compact expression for the bond price. Using the closed form expression for a geometric sum $\sum_{j=1}^n \alpha^j = \frac{\alpha - \alpha^{n+1}}{1-\alpha}$, where $\alpha = (1+y/2)^{-1}$, we get
$$P = \frac{2C}{y}\left[1 - (1+y/2)^{-n} \right]+ F (1+y/2)^{-n} $$
A: The correct formula for the duration is,
$$\frac{\sum_{i=1}^{16}\frac i2\cdot\frac{100}{1.03^{i+1}}+\frac{16}2\cdot\frac{5000}{1.03^{17}}}{\sum_{i=1}^{16}\frac{100}{1.03^{i}}+\frac{5000}{1.03^{16}}}$$
