The US_Zero command converts a U.S. Treasury interest-rate series into
a duration number.
US_BOND_DURATION(DGS10,10)
This example takes the 10-year Treasury constant maturity rate,
DGS10, and converts it into a bond duration.
US_BOND_DURATION(rateSeries, maturityYears)
The first argument is an interest-rate series. The second argument is the maturity, expressed in years.
For each observation, the routine treats the quoted interest rate as the yield used to calculated a bond duration.
The command is a transformation tool. It does not estimate a full yield curve. It converts a single interest-rate series into annualized duration.