Simple Moving Average
The Simple Moving Average (SMA) is commonly used to analyze time-series data. To calculate it, we define a moving window of N
periods, N
days in our case. We move this window along the data and calculate the mean of the values inside the window.