Book Image

Practical Time Series Analysis

By : Avishek Pal, PKS Prakash
Book Image

Practical Time Series Analysis

By: Avishek Pal, PKS Prakash

Overview of this book

Time Series Analysis allows us to analyze data which is generated over a period of time and has sequential interdependencies between the observations. This book describes special mathematical tricks and techniques which are geared towards exploring the internal structures of time series data and generating powerful descriptive and predictive insights. Also, the book is full of real-life examples of time series and their analyses using cutting-edge solutions developed in Python. The book starts with descriptive analysis to create insightful visualizations of internal structures such as trend, seasonality, and autocorrelation. Next, the statistical methods of dealing with autocorrelation and non-stationary time series are described. This is followed by exponential smoothing to produce meaningful insights from noisy time series data. At this point, we shift focus towards predictive analysis and introduce autoregressive models such as ARMA and ARIMA for time series forecasting. Later, powerful deep learning methods are presented, to develop accurate forecasting models for complex time series, and under the availability of little domain knowledge. All the topics are illustrated with real-life problem scenarios and their solutions by best-practice implementations in Python. The book concludes with the Appendix, with a brief discussion of programming and solving data science problems using Python.
Table of Contents (13 chapters)

Auto-regressive models


Another very famous approach to regress on time series data is to regress it with its lag term. This genre of models is referred to as auto-regressive models (AR models). The AR models are very good in capturing trends as the next time values are predicted based on the prior time values. Thus, AR models are very useful in situations where the next forecasted value is a function of the previous time period, such as an increase in average stock price gain due to good company growth; we expect the effect to retain over time and price should keep increasing as a function of time as the trend component.

The auto-regressive model is defined as AR(p), where p refers to the order of the AR component.

The first-order AR model is denoted by AR(1):

xt = ø∈t-1 + ∈t

The second-order AR model is denoted by AR(2):

xt = ø1t-1 + ø2t-2 + ∈t

The pth order AR model is denoted by AR(p):

xt = ø1t-1 + ø2t-2 + ... + øpt-p + ∈t

Here, ø is the model coefficient, ∈t ∼ N (0, σ2) is an error in time...