# Decomposing a bond's excess returns into duration, volatility, and market-price-of-risk. Discrepancy/confusion with Rebonato text

I am working on deriving the formula for the market price of risk for zero-coupon bonds and the associated formula for the excess returns. I am following the derivation in Appendix 12.6 of Rebonato's Bond Pricing and Yield Curve Modeling (pages 202-205). I am coming to a different formula than Rebonato for the excess returns, assuming that we have solved for the market price of risk vector $$\lambda \in \mathbb{R}^{p}$$, and I would like some assistance in resolving the discrepancy.

Setup: Assume we have $$n$$ factors $$x_i$$ which have the following dynamics: $$dx_i = \mu_i \, dt + \sum_{k=1}^{n} \sigma_{i, k}\, dz_{i},$$ where $$z_1, \dots, z_n$$ are independent Brownian Motions. Moreover, assume that each of our $$n+1$$ bonds $$P^1, \dots, P^{n+1}$$ has the dynamic $$dP_{i} = \mu_{P^i} P^{i} \, dt + \sum_{k=1}^{n} \sigma_{P^i}^{k} P^i \, dz_{k}.$$ That is, each bond can be shocked by each of the n Brownian Motions with each bond having a specific volatility corresponding to each $$z_{i}$$.

Lastly, let's assume that we have gone through the computation for the market-price-of-risk vector $$\lambda$$, the vector is independent of any zero coupon bond, and for any bond $$P^j$$ we have the formula for excess returns: $$\underbrace{\mu_{j} - r_t}_{\text{excess return}} = \lambda^\top\begin{pmatrix}\sigma_{P^j}^{1}\\ \vdots \\ \sigma_{P_{j}}^{n} \end{pmatrix}$$

Decomposition of EXCESS RETURNS into Duration, Volatility, and Market-Price-of-Risk (ISSUE IS HERE)

Rebonato claims that the coordinates of the volatility vector $$\sigma_{P^j}^{k}$$, $$k=1, \dots, n$$, have the form $$\sigma_{P^j}^{k} = \frac{1}{P^j} \frac{\partial P^j}{\partial x_k}\, \sigma_{k},$$ where $$\sigma_k$$ is the total volatility of the $$k$$-th factor $$\sigma_{k} = \sqrt{\sum_{i=1}^{n} \sigma_{i, k}^{2}}.$$ Note that $$\sigma_{i, k}$$ comes from the dynamics for $$x_i$$. Expanding the excess returns equation into a sum gives a beautiful breakdown: $$\text{Excess Return} = \sum_{k=1}^{n} \underbrace{\frac{1}{P^j} \frac{\partial P^j}{\partial x_k}}_{\text{Duration}}\, \times\, \underbrace{\sigma_{k}}_{\text{total volatility}}\,\times \, \underbrace{\lambda_{k}}_{\text{Market-price-of-risk for factor k}}.$$

However, I am getting a different, perhaps messier, formula. Expressing the bond price $$P^j$$ as a function of $$t$$ and each of the factors $$x_i$$ and applying Ito's Lemma gives \begin{align*} dP^j &= \frac{\partial P^{j}}{\partial t}\, dt + \sum_{k=1}^{n} \frac{\partial P^j}{\partial x_k}\, dx_k + \frac{1}{2} \sum_{i, \ell =1}^{n} \frac{\partial^2 P^j}{\partial x_i \partial x_\ell}\, dx_i\, dx_\ell\\ &= \bigg[ \frac{\partial P^{j}}{\partial t} + \sum_{i=1}^{n} \frac{\partial P^j}{\partial x_i} \mu_{i} + \text{Convexity Term}\bigg] \,dt + \sum_{i=1}^{n} \frac{\partial P^j}{\partial x_i}\bigg(\sum_{k=1}^{n} \sigma_{i, k}\, dz_{k} \bigg) \end{align*}

I assume this last part is where Rebonato is getting his formula from. However, if we pair the above formula with the assumed dynamics for the bond price at the top, and we equate the volatilities to each other, we have $$\sum_{k=1}^{n} \sigma_{P^i}^{k} P^i \, dz_{k} = \sum_{i=1}^{n} \frac{\partial P^j}{\partial x_i}\bigg(\sum_{k=1}^{n} \sigma_{i, k}\, dz_{k} \bigg).$$ Hence, equating terms which are attached to $$z_k$$ on both sides (which requires flipping the order of summation on the right), we have $$P^{j} \sigma_{P^j}^{k}\, dz_{k} = \bigg(\sum_{i=1}^{n} \frac{\partial P^j}{\partial x_i} \sigma_{i, k}\bigg)\, dz_k,$$ and lastly $$\sigma_{P^j}^{k} = \sum_{i=1}^{n} \frac{1}{P^j}\frac{\partial P^j}{\partial x_i} \sigma_{i, k}.$$ So, rather than an individual duration factor, as Rebonato has, we have a summation of durations with respect to the factors $$x_i$$ multiplied by each factor's volatility to the shock term $$z_{k}$$. Plugging this into the Excess Returns formula, we have $$\text{Excess Return} = \sum_{k=1}^{n} \bigg[\sum_{i=1}^{n} \frac{1}{P^j}\frac{\partial P^j}{\partial x_i} \sigma_{i, k} \bigg]\,\times \, \lambda_{k}$$

Here, the market-price-of-risk is not associated to the factor $$x_k$$, but rather to the underlying shocking force $$z_k$$, and that might be where the discrepancy comes in. However, I am not sure what Rebonato is doing precisely when he accumulates all of the shocking volatilites $$\sigma_{i, k}$$ into a total volatility, so if anyone who is familiar with this derivation or who has read the book could help, that would be greatly appreciated.