### Price

The price of a bond with maturity T and face value F, paying a coupon of c with a frequency f per year, can be written as:

$$ Price = \sum_{i=1}^{n=fT}{\frac{c}{{\left( 1+r/f \right)}^i}}+\frac{F}{{\left( 1+r/f \right)}^n} $$ $$ \quad \quad = c \sum_{i=1}^{n}{z^i}+F z^n $$ $$\quad \quad= c \frac{z-z^{n+1}}{1-z}+F z^n$$

Where r represent the flat spot rate, and we let \( z= \frac{1}{1+r/f} \) to simplify the formula.

We also used the sum of series formula (see wikipedia for its derivation):

$$ \sum_{i=1}^{n}{z^i}=\frac{z-z^{n+1}}{1-z} $$