# How to calculate spot rates using market data of bonds?

Given 3 Bonds $$A$$, $$B$$ and $$C$$ with $$\begin{matrix} & \text{Bond } A& \text{Bond } B& \text{Bond } C& \\ \text{Price:}& 101,12\%& 99,03\%& 102,95\%\\ \text{Mat. in years:}& 0,5& 1,5& 2,5\\ \text{Coupon:}& 2\%& 1\%& 3\% \\ \text{Coupon frequency:}& \text{per year}& \text{per year} & \text{per year}\\ \text{Nominal value:}& 1.000& 10.000& 1.000\\ \end{matrix}$$

How can I determine the spot rates implied by these bonds? I.e. what would be the spot rate for the next 0,5 years, the next 1,5 and 2,5 years?

I assume that it is not correct to just claim that the spot rate for 0,5 years is 1% (the accrued interest from Bond $$A$$)?

Furthermore, how can I calculate the forward rate from these rates? Is it correct to calculate the 6x18 forward rate $$F$$ via the equation $$(1 + \frac12r_{0,5})(1+F) = (1+\frac32r_{1,5})$$ where $$r_{0,5}$$ and $$r_{1,5}$$ are the spot rates for the given duration?

Edit: The return I can realise on Bond $$A$$ would be the following: I can buy at 102,12% (accounting for accrued interest), after 0,5 years, I get 102%. Does solving $$102,12 \cdot (1 + \frac12 r_{0,5}) = 102$$ yield the desired spot interest rate? In this case $$r_{0,5} = -0,24\%$$?