Because no matter what kind of investment market interest rate will change, yield to maturity's curve will also have some deviation, so the return on investment is almost not equal to yield to maturity, which makes the return realized by investors still have some differences with yield to maturity, because yield to maturity can't truly reflect the return on investment of fixed-income securities, so yield to maturity should not be an objective indicator to measure the return on investment.
For bond portfolio yield, it is necessary to treat the whole portfolio as a single bond and the present value of all cash flows of the bond portfolio is equal to the appropriate discount rate of the market value of the bond portfolio, that is, the yield to maturity of the bond portfolio, which can also be called internal rate of return. Yield to maturity is difficult to calculate, so it is not widely used, but the return rate of stock portfolio is relatively easy to calculate, especially the index reflecting the risk of stock portfolio.