I have the returns of three stocks, $R_{1t}$, $R_{2t}$, $R_{3t}$, with 100 monthly observations for each return series. Lets suppose that I create a portfolio consisting of stocks 1 and 2, $P_t=w_{1t}R_{1t}+w_{2t}R_{2t}$. $w_{1t}$ and $w_{2t}$ are the relative portfolio weights for each month, which sum to 1. Now I calculate the covariance between the portfolio and stock 3, $COV(P_t,R_{3t})=COV(w_{1t}R_{1t}+w_{2t}R_{2t},R_{3t})$.
I want to know what the contribution of stocks 1 and 2 is for the covariance $COV(P_t,R_{3t})$. In other words, I want to decompose the covariance into the contribution of each stock. If $w_{1t}$ and $w_{2t}$ were constant, the solution would be $COV(P_t,R_{3t})= w_{1}COV(R_{1t},R_{3t})+w_{2}COV(R_{2t},R_{3t})$. The problem ist that the weights $w_{1t}$ and $w_{2t}$ change over time so that this exact decomposition does not apply. So how can I decompose the covariance with time varying portfolio weights? Any idea?