Thank you Henry, Some useful ideas ... just what I was looking for.
David On Wed, 2010-06-09 at 21:07 -0400, Henry Rich wrote: > You can chop off the shorter dataset (that's what I do), or extend the > original data with average values, or wrap the original around (more > useful in signal processing than trading). > > Since you normally are interested in the end rather than the beginning, > you can |. the data before taking the average. > > But I really want to suggest that a simple moving average is poor. > Where there is a lot of noise, you should give a lower weight to > outliers. I calculate the mean & variance of the set, & then go back & > underweight points that are 'way off'. Google 'trimmed estimators'. > > Any may I suggest, since October 2008 the definition of 'way off' has > been relaxed quite a bit. > > Henry Rich > > David Vincent-Jones wrote: > > I am plotting daily data over a 6 month period and also providing (on > > the same chart) a 7 day moving average. Using Infix and a simple > > arithmetic average appeared to be the correct solution, however the > > shape of the moving average using Infix is truncated with reference to > > the raw data giving me a series of zeros at the end. > > > > I can 'pad' the raw data with the last value and then chop the padding > > off after the calculation ..... or is there a better solution? > > > > David > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
