The factors that affect yield include:
The risk of the investment: The higher the risk of an investment, the higher its yield will typically be. This is because investors demand a higher return for taking on more risk.
The length of time to maturity: The longer the length of time to maturity, the higher the yield will typically be. This is because investors are willing to accept a lower yield for investments that mature sooner.
The level of interest rates: The level of interest rates in the economy will also affect yield. When interest rates are high, yields will typically be higher.