Time series analysis of Stock data

What is Time Series?

Time series is a set of observations or data points taken at specified time usually at equal intervals and it’s used to predict the future values based on the previous observed values. In time series there must be one variable, that is Time. Time series are very frequently plotted via line charts.Time series are used in statistics, stock market forecasting, signal processing, pattern recognition, weather forecasting, earthquake prediction, astronomy, and largely in any domain of applied science and engineering which involves the measurements should be in equal intervals like a day, a week, a month and a year.

 

 

Components of Time Series Analysis:

 


 

  1. Trend
  2. Seasonality
  3. Irregularity
  4. Cyclic

 

 

ARIMA Model:

 

The ARIMA model is a form of Regression analysis. An ARIMA model can be better understood by looking into its individual components: Auto regression (AR), Integrated (I) and Moving Averages (MA). In AR model, Partial Auto Correlation Function(PACF) graph is used to find P value and in MA model, Auto Correlation Function(ACF) graph to find q value. Integration Function is used to find the d value. ie, the differentiation

What is Stationarity?

Time series is said to be stationary if its statistical properties such as mean, variance remain constant over time. A model that shows stationarity is one that shows there is constancy to the data. Most economic and market data show trends, so the purpose of differencing is to remove any trends or seasonal structures. If not Stationary, It has to perform transformations on the data to make it Stationary. For check stationarity it have:

  1. Rolling Statistics
  2. Dickey-Fuller test

Auto correlation and Partial Auto-Correlation Functions

The ACF graph is drawn to determine the q value and the PACF graph is drawn to determine the p value.

From the above graphs it can be see that the value of p is 2 and the value of q is 2 respectively.

Now these values have to be substituted in the ARIMA model to get the predictions.

The ARIMA model captures the movement of data correctly.

Residual Sum Of Squares(RSS) should be less as possible.

The RSS value has been less as compared to AR and MA models.

Last updated 2020-10-09 23:03:51 by Kennedy Waweru