Duration is most accurate as a measure of interest rate risk for a bond portfolio when the slope of the yield curve:
Duration measures the change in the price of a portfolio of bonds if the yields for all maturities change by the same amount; that is, it assumes the slope of the yield curve stays the same.