I tried to search for this specific question, although I didn’t found a conclusive answer. I have a dataset containing the yields of several T-Bills and T-Notes that were downloaded from a Bloomberg Terminal using the function px_last. In order to achieve the actual prices of such securities how I should set up the formula?
- $P=\frac{FV}{\left(1 + \frac{px_{last}}{100}\right)^{\frac{m}{12}}}$
- $P=FV \times \left(1 - \left(\frac{px_{last}}{100} \right)^{\frac{m}{12}}\right)$
where $m$ are the months up to maturity.
Then if I need to calculate daily returns, I would kindly ask you if it is correct to use a formula:
$$ \begin{aligned} R =& \left(1+\frac{px_{last}.shift(1)}{100}\right)^{\frac{1}{365}} - 1 \times \frac{\partial P}{\partial px_{last}} \times \frac{px_{last} - px_{last}.shift(1)}{100} \\ &+ 0.5 \times \frac{\partial^2 P}{\partial px_{last}^2} \times \left( \frac{px_{last} - px_{last}.shift(1)}{100} \right)^2 \end{aligned} $$
or simply
$$R=\frac{P_{t+1}-P_t}{P_t}$$
where: $P$ represent the price formula, $px_{last}.shift(1)$ is intended as the yield of the previous day
Thank you in advance,
A