The YTM of asset $\begin{array}{l}i\end{array}$ is computed using the price obtained on each valuation date so that:
with  $\begin{array}{l}P_t\end{array}$ the price of asset $\begin{array}{l}i\end{array}$ at time  $\begin{array}{l}t\end{array}$$\begin{array}{l}CF_1\dots CF_T\end{array}$ the stream of future payouts, and $\begin{array}{l}YTM_{i,t}\end{array}$ the yield-to-maturity or IRR rate for asset $\begin{array}{l}i\end{array}$ at time $\begin{array}{l}t\end{array}$.