-
Book Overview & Buying
-
Table Of Contents
Time Series Analysis with Python Cookbook - Second Edition
By :
A familiar association people make is between forecasting and financial data (such as predicting stock prices or market movements). In reality, forecasting is used in more industries than finance, leveraging historical data to make future predictions. More specifically, this book is about time-series analysis, a process to gain better insight from historical data, capture trends and cyclical patterns, and build production-ready forecasting models.
When working with data that contains observations that change over time and is recorded at specific intervals, you are dealing with time-series data. You will find time-series data in many domains, and the discipline of time-series analysis covers various use cases. For example, time-series analysis is used in science (forecasting weather, earthquakes, air quality, or species growth), finance (forecasting stock return, budget, sales, or volatility), government (forecasting inflation, unemployment rates, GDP, or population birth rate), medicine (tracking infectious disease transmission, monitoring electrocardiogram or blood glucose, or forecasting healthcare costs), engineering (predictive maintenance, production decline analysis, or traffic volume forecasting), business (inventory management, product demand planning, or resource planning), and much more. Time-series data is pretty much all around us, and you will most definitely encounter it in your work.
In this book, you will find practical end-to-end recipes that you can apply and use—less theory and more actionable results. This second edition will take you through the complete journey of time-series analysis. We cover the entire process, from environment setup to acquiring and ingesting time-series data from diverse sources (files, SQL, NoSQL, cloud storage, and data warehouses). You will learn how to explore the data through exploratory data analysis (EDA) techniques specific to time series, transform and manipulate the data, and train and evaluate a wide variety of models for forecasting.
This book and its corresponding GitHub repository covers concepts, techniques, and algorithms ranging from commonly used to more advanced and modern approaches. For example, you will learn how to train and validate models across a full spectrum of techniques covering statistical methods (e.g., ARIMA, SARIMA, Theta, Prophet, VAR, and GARCH), machine learning algorithms (e.g., scikit-learn, sktime, and ensemble methods such as XGBoost), deep learning architectures (e.g., RNN, LSTM, TCN, and N-HiTS), probabilistic modeling (e.g., quantile regression, Monte Carlo dropout, and conformal prediction) for forecasting, spectral (or frequency-domain) analysis (e.g., Fast Fourier transform (FFT), periodograms, and Welch’s method), and comprehensive outlier (anomaly) detection (using statistical, machine learning, and deep learning techniques).
Most importantly, the variety of datasets used in this book will give you a better insight into how these different models work and how you can pick the most appropriate approach to solve your specific problem. You will be introduced to a vast number of libraries, with enough depth and comparison for you to understand why and when to use them and how they work. The book covers statsmodels, scikit-learn, sktime, Darts, StatsForecast, NeuralForecast, TensorFlow, PyTorch, aeon, PyOD, Prophet, NeuralProphet, XGBoost, LightGBM, Optuna, arch, pmdarima, SciPy, TSFEL, Modin, Dask, Polars, pandas, hvPlot, Seaborn, and much more.