# Compute bond price with more coupon payments in a year

If I have a 5-year bond, which pays every six months a coupon of 2.5% with a yield of 1.5%, should I split up the yield to compute the bond price?

Or is below the way to compute it?

$\displaystyle PV = \frac{2.5}{1.015} + \frac{2.5}{1.015^2} + ... + \frac{100 + 2.5}{1.015^{10}}$

$$P = \sum_{i=1}^N \frac{c/f}{(1 + y/n)^{nt}},$$ where $c$ is the size of the cash flow, $f$ is the coupon frequency per year, $y$ is the annualized yield, and $n$ is the compounding frequency per year.
In your case, $c$ should be $2.5/2=1.25$. Assuming yield is also semi-annually compounded, then it should be $$PV = \frac{1.25}{(1 + 0.75\%)} + \frac{1.25}{(1 + 0.75\%)^2} + \cdots$$
If yield is annually compounded, however, this would become $$PV = \frac{1.25}{(1 + 1.5\%)^{0.5}} + \frac{1.25}{(1 + 1.5\%)^1} + \cdots$$