in [ ]appl_std [ : out[ ]nan nan nan nan freqb in [ ]appl_std plot(figure - apple price with -day ma figure - apple -day daily return standard deviation to compute an expanding window meanyou can see that an expanding window is just special case where the window is the length of the time seriesbut only one or more periods is required to compute value time series www it-ebooks info