careful D’Artagnan, “certain period of time” is more precisely identified as the holding period, i.e. the “HP” component of “HPR.” Moreover, the holding period can be shorter than the time until maturity, so the terms “holding period” and “maturity” shouldn’t be used interchangeably.
Are you possibly thinking of the yield to maturity (YTM), which would only equal the HPR if the fixed income security was held to maturity and its periodic cash flows were reinvested at the YTM…