I thought I had a pretty good grasp on how to calculate this but I'm getting questioned on it and just want to be sure I'm not getting it mixed up. In my notation you enter into the repo contract at $t=t_0$ and exchange a cash nominal, C, for bonds where C is determined by $C=B_{t_0} (1-HC)$ where HC is the haircut, e.g. 2%. The maturity of the repo is at $t_2$
The way I view it is that the present value of the repo at $t_1$ would be the value of the cash leg up to $t_2$ minus the cost of closing out the repo by entering into an opposite repo agreement from $t_1$ to $t_2$. The value of the cashleg of the reverse repo at that point would be $B_{t_1} (1-HC)$ and you get interest at the prevailing repo rate at the time that may be different from that of the first repo. I have put the calculations below. Is this correct? I am asking because I am being told by industry professionals that the value of the bond at the time doesn't affect the present value, only the risk. As a side note, if I am doing this correctly should you also discount this value from $t_2$ to $t_1$ to get the PV?
\begin{equation} PV = C_{t_2} - B_{t_1} (1 - HC) \exp{(r_2(t_2-t_1))} \end{equation} \begin{equation} C_{t_2} = C_{t_0} \exp{(r_1(t_2-t_0))} = B_{t_0} (1-HC) \exp{(r_1 (t_2-t_0))} \end{equation}
C = Cash leg value
B = Bond leg value
HC = haircut
PV = present value
$r_i$ = prevailing repo rate at time $t_i$