TTM Spot Rate 1.00 3.0000% 2.00 5.0510% 3.00 7.1979%. The Python code implementing the calculation described above would look as follows. The spot rates will be populated in output list s, based on the same time scale t as the original YTM rates y s = # output array for spot rates for i in range ( 0, len ( t ) ): #calculate i-th spot rate sum = 0 for j in range ( 0, i ): #by iterating through 0.i sum += y i / ( 1 + s j ).
t j value = ( ( 1 +y i ) / ( 1 - sum ) ). ( 1 /t i ) - 1 s. Append ( value ) Final result.
Once all the par term structure rates have been derived, we us the bootstrapping method for deriving the zero curve from the par term structure. This is an iterative process that allows us to derive a zero coupon yield curve from the rates/ prices of coupon bearing instruments.