Atwan, Tarek A. | Time Series Analysis with Python Cookbook | E-Book | www2.sack.de
E-Book

E-Book, Englisch, 812 Seiten

Atwan, Tarek A. Time Series Analysis with Python Cookbook

Practical recipes for the complete time series workflow, from modern data engineering to advanced forecasting and anomaly detection
2. Auflage 2026
ISBN: 978-1-80512-299-9
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection

Practical recipes for the complete time series workflow, from modern data engineering to advanced forecasting and anomaly detection

E-Book, Englisch, 812 Seiten

ISBN: 978-1-80512-299-9
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection



To use time series data to your advantage, you need to master data preparation, analysis, and forecasting. This fully refreshed second edition helps you unlock insights from time series data with new chapters on probabilistic models, signal processing techniques, and new content on transformers. You'll work with the latest releases of popular libraries like Pandas, Polars, Sktime, stats models, stats forecast, Darts, and Prophet through up-to-date examples.
You'll hit the ground running by ingesting time series data from various sources and formats and learn strategies for handling missing data, dealing with time zones and custom business days, and detecting anomalies using intuitive statistical methods.
Through detailed instructions, you'll explore forecasting using classical statistical models such as Holt-Winters, SARIMA, and VAR, and learn practical techniques for handling non-stationary data using power transforms, ACF and PACF plots, and decomposing time series data with seasonal patterns. The recipes then level up to cover more advanced topics such as building ML and DL models using TensorFlow and PyTorch and applying probabilistic modeling techniques. In this part, you'll also be able to evaluate, compare, and optimize models, finishing with a strong command of wrangling data with Python.

Atwan, Tarek A. Time Series Analysis with Python Cookbook jetzt bestellen!

Weitere Infos & Material


Preface


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 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.

Who this book is for


This book is for data analysts, business analysts, data scientists, data engineers, or Python developers who want practical Python recipes for time-series analysis and forecasting techniques. Fundamental knowledge of Python programming is required. Although having a basic math and statistics background will be beneficial, it is not necessary. Prior experience working with time-series data to solve business problems will also help you to better utilize and apply the different recipes in this book.

What this book covers


This book’s GitHub repository includes three bonus chapters not in the print edition: covers Python environment setup with Pip and Conda; Bonus explores advanced deep learning with probabilistic forecasting; and Bonus introduces frequency domain analysis for cyclical patterns. There are also additional recipes: : , : , : : , : , : which you can find on GitHub in the respective chapter folders. These resources provide additional foundational and advanced techniques for time series analysis.

, , is an introduction to time-series data. This chapter shows you how to read data from various and commonly used file types, whether stored locally or on the cloud (e.g., AWS S3). You will also learn how to handle large datasets using Dask, Polars, and Modin. The recipes will highlight advanced options for ingesting, preparing, and transforming data into a time-series DataFrame for later analysis.

, , picks up from  and focuses on reading data from various database systems. This includes relational (PostgreSQL and MySQL) and non-relational (MongoDB), as well as time-series (InfluxDB, TimescaleDB, and TDEngine) databases, whether on-premises or on a cloud service such as Amazon Redshift or Snowflake. For Snowflake, you will explore multiple APIs, including Snowpark for modern data engineering workflows. The recipes will highlight different methods and techniques to offer flexibility on how data can be ingested, prepared, and transformed into a time-series DataFrame for later analysis.

, , covers different options and use cases to store time-series data for later retrieval. The techniques will cover various methods and file types, whether on-premises or in the cloud (AWS, GCP, and Azure).

, , builds on , focusing on writing data for scale. This covers different techniques for writing data to relational and non-relational database systems such as those discussed in , including on-premises and cloud services, such as Snowflake.

, , takes a practical and intuitive approach to an intimidating topic. You will learn how to deal with the complexity of dates and time in your time-series data. The chapter illustrates practical use cases for handling time zones, custom holidays, and business days, working with Unix epoch and UTC.

, , explores different methods for identifying and handling missing data. You will learn different imputation and interpolation techniques. The chapter starts with simple statistical methods and then explores more advanced multivariate imputation, such as and .

, , covers statistical methods for outlier and anomaly detection. These techniques are easy to interpret and implement. The chapter uses data from the Numenta Anomaly Benchmark (NAB) to evaluate different anomaly detection algorithms. Beyond point outliers, the chapter covers contextual outliers using techniques such as the Hampel filter, STRAY, and Matrix Profile.

, , dives into visualization techniques for effective EDA, including interactive visualizations with . You will learn how to investigate and diagnose your time-series data to test for assumptions such as stationarity and autocorrelation, and apply transformations such as power decomposition, differencing, and power transforms such as the Box-Cox transformation.

, , kicks off the journey into modeling. The chapter intuitively explains the Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF) plots, and then moves on to training, diagnosing, and comparing different statistical models, including exponential smoothing, Autoregressive Integrated Moving Average (ARIMA), and Seasonal ARIMA (SARIMA). You’ll learn how to implement these using the statsmodels, Darts, and StatsForecast libraries and learn how to tune them with grid search.

, , dives into more advanced and practical models. This includes the Theta method, Vector Autoregressive (VAR) for multivariate time series,  Generalized Autoregressive Conditional Heteroskedasticity (GARCH) for forecasting volatility, and an introduction to the Prophet algorithm for forecasting and changepoint. Finally, it demonstrates automated...



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.