### Summary

We start with the price of a bond as present value of its coupons and face value:

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

Where T represent the maturity of the bond in years, F the face value, c the amount of coupon that is paid f times per year, and r the yield to maturity (flat spot rate).

And derive analytical formulae for its price and greeks, which we summarise below:

$$ Price = c \frac{z-z^{n+1}}{1-z}+F z^n$$ $$ Duration = -\frac{c z}{f} z \frac{1-(n+1)z^n+n z^{n+1}}{{\left(1-z\right)}^2}- \frac{F n}{f} z^{n+1} $$ $$ Convexity= \frac{c z^2}{f^2} \left[z \frac{1+z-{(n+1)}^2 z^n +(2 n^2 + 2 n -1) z^{n+1} -n^2 z^{n+2}}{{\left(1-z\right)}^3} + z \frac{1-(n+1)z^n+n z^{n+1}}{{\left(1-z\right)}^2} \right]+ \frac{F n (n+1)}{f^2} z^{n+2} $$ $$Theta= f \; ln{\left( 1+r/f \right)} \quad Price $$ $$ \mbox{Coupon Rate Delta}= \frac{1}{f}F \frac{z-z^{n+1}}{1-z} $$ $$ \mbox{FV Delta}=\frac{c}{F} \frac{z-z^{n+1}}{1-z}+ z^n$$

Where \( z= \frac{1}{1+r/f} \).