In this paper, we propose an implementation method for a new concept of stochastic duration which can be used to measure the sensitivity of complex bond portfolios with respect to the fluctuations of the yield surface. Our approach relies on a first order approximation of a chaos expansion in the direction of the yield surface, whose dynamics is described by the Musiela equation. Using the latter technique, we obtain an infinite-dimensional generalization of the classical Macaulay duration, which can be interpreted as the derivative of a first order approximation of a Taylor series on locally convex spaces.