Next, we will denoise our stock price data to remove the somewhat irrelevant market fluctuations that are currently present. We can do this by weighting the data points in an exponentially decreasing manner (otherwise known as exponential smoothing). This allows us to let recent events have a higher influence on the current data point than events from the distant past so that each data point can be expressed (or smoothened) as a weighted recursive function of the current value and preceding values in the time series. This can be expressed mathematically as follows:
The preceding equation denotes the smoothing transformation of a given data point (xt) as a function of a weighted term, gamma. The result (St) is the smoothened value of a given data point, while the gamma term denotes a smoothing factor between zero and one. The decay term allows us to encode...