Stationarity in Time Series
- What is a Stationary Time Series?
A time series is stationary if statistical properties like mean, the variance of the series are constant over time, and an autocovariance that does not depend on time.
2.Why is it important for a time series to be stationary?
Most time series model work on the assumption that the time series is stationary, through this we can say if a time series has a particular behavior over time, there is a very high probability that it will follow the same in the future.
Let us run a stationarity test on financial data collected from google of Tesla of there Stock prices in the months of September,October,November,December for the year 2020.
How the data looks like:
3.Checking Stationarity
(i)Checking it Visually by plotting.
It is evident that there is no trend or seasonality present in this time series.
(ii)Plotting rolling statistics
(iii)Dickey-Fuller Test
From the graph we can say it is not stationary,also the test statistic is way more than the critical values so we can conclude its not stationary.
Check out the code here :https://github.com/ShiviV/Project/blob/master/Checking%20stationarity.ipynb