The YTM of asset i is computed using the price obtained on each valuation date so that:
P_{i,t}=\sum_{t=1}^T \frac{CF_t}{(1+r_{i,t})^t} |
with P_t the price of asset i at time t, CF_1\dots CF_T the stream of future payouts, and YTM_{i,t} the yield-to-maturity or IRR rate for asset i at time t.