# Duration of a floating rate bond with spread

I need to calculate the duration of a floating rate bond with spread. With zero spread the price of the bond is given by: $$p_\tau=(1+c_1)e^{-r(\tau_1) \cdot \tau_1}$$ so the duration is: $$-\frac{\frac{dp_\tau}{r}}{p_\tau} = \tau_1$$ So the duration is the time $$\tau_1$$ until the next coupon payment.

When the spread is not zero(i.e $$s$$), the price in time $$0$$ is given by: $$\begin{equation} p^{s}_\tau = (1+c_1)e^{-r(\tau_1) \cdot \tau_1}+ \sum_{k=1}^n s \cdot e^{-r(\tau_k) \tau_k} \quad (1) \end{equation}$$ So the duration is going to be: $$-\frac{\frac{dp^s_\tau}{r}}{p^s_\tau} = \frac{\tau_1\cdot (1+c_1)e^{-r(\tau_1) \cdot \tau_1} + \sum_{k=1}^n s \cdot \tau_k \cdot e^{-r(\tau_k) \tau_k}}{(1+c_1)e^{-r(\tau_1) \cdot \tau_1}+ \sum_{k=1}^n s \cdot e^{-r(\tau_k) \tau_k}} \quad (2)$$

Questions:

1. The formula (1) is correct?
2. The formula (2) is correct?
3. In which other case the duration of a floating rate bond is not the time until the next coupon payment?