Performing smoothing – moving average
Smoothing is usually performed as a part of time series analysis to reveal patterns and trends better. Smoothing techniques can help remove noise from our time series dataset; this reduces the impact of short-term fluctuations and reveals underlying patterns better.
Moving average is a commonly used smoothing technique that helps identify trends and patterns in time series data. It works by computing the average of a set of adjacent data points in the time series. The number of adjacent points is determined by the size of the window. The window refers to the number of periods for which we want to compute an average. This window is usually chosen based on the frequency of the data and the nature of the patterns we are trying to identify. For example, if we have daily stock price data, we can decide to compute the average price over the last 10 days, inclusive of today. In this case, 10 days is the window size. To achieve the “moving...