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)

Second order exponential smoothing


If first order exponential smoothing does not perform well, then there is a trend in the time series data. The trend is commonly observed in many domains such as when marketing campaigns are run by e-commerce companies, the sales rise or any good annual performance by a company will have a bullish effect on its stock prices. The linear trend can occur due to linear trend between time and response:

xt = constant + ωt + εt

Here, ω is the coefficient that leads to trend. The second order exponential smoothing helps capture the trend in time series data by including another term to the first order exponential smoothing as follows:

Here, Tt captures the trend component of the exponential smoothing and is represented as follows:

Here, α is the data smoothing factor and β is the trend smoothing factor with values between [0, 1]. The next stage forecast can be generated as follows:

In second order smoothing, the initial value for the trend component can be assigned...