Time Series Analysis in Python

In Data Science mainly relies on working with two types of data - cross-sectional and time series. This course will help you master the latter by introducing you to ARMA, Seasonal, Integrated, MAX and Volatility models as well as show you how to forecast them into the future.

Sign up to
preview the course
for FREE!

Create a free account and start learning data science today.

create free account
Our graduates work at exciting places:
walmart
tesla
paypal
citibank
booking.com

Section 1

Introduction

In this short section, we’ll tell you a bit more of what the course is about, how its structured and what our goal is.

Premium course icon What does the course cover

Section 2

Setting up the working environment

In this part of the course we will explain to you how to set up Python 3 and then load up Jupyter. We’ll also show you what the Anaconda Prompt is and how we use it to download and import new modules.

Premium course icon Setting up the environment - Do not skip, please!
Premium course icon Why Python and Jupyter?
Premium course icon Installing Anaconda
Premium course icon Jupyter Dashboard - Part 1
Premium course icon Jupyter Dashboard - Part 2
Premium course icon Installing the Necessary Packages

Section 3

Introduction to Time Series in Python

In this section of the course we are going to learn what makes a dataset a time series, and discuss what separates it from cross-sectional data. We’ll introduce the appropriate mathematical notation for such data, before loading up a dataset and quickly examining it.

Premium course icon Introduction to Time Series Data
Premium course icon Notation for Time Series Data
Premium course icon Peculiarities
Premium course icon Loading the Data
Premium course icon Examining the Data
Premium course icon Plotting the Data
Premium course icon The QQ Plot

Section 4

Creating a Time Series Object in Python

In this section of the course we will go through the pre-processing aspects of working with time series. We’ll see how to interpret string text as dates and set these dates as indices of the data set. We’ll then set a fixed frequency and account for any missing values before splitting up the set for training and testing. In the appendix, we’ll show you how to import data directly from Yahoo Finance, so you can conduct your own analysis after completing the course.

Premium course icon Transforming String inputs into DateTime Values
Premium course icon Using Dates as Indices
Premium course icon Setting the Frequency
Premium course icon Filling Missing Values
Premium course icon Adding and Removing Columns in a Data Frame
Premium course icon Splitting up the Data

Section 5

Working with Time Series in Python

In this section of the course, we’ll examine and visualize some important types of time series, like white noise and a random walk. We’ll then discuss important concepts like stationarity, seasonality and autocorrelation, before exploring the ACF and PACF of a S&P 500 prices.

Premium course icon White Noise
Premium course icon Random Walk
Premium course icon Stationarity
Premium course icon Determining Weak Form Stationarity
Premium course icon Seasonality
Premium course icon Correlation Between Past and Present Values
Premium course icon The ACF
Premium course icon The PACF

Section 6

Picking the Correct Model

In this short section, we’ll discuss the general rules of manual model selection. We will talk about which models we prefer, what we want to avoid and how to decide between models. We’ll talk about the Log-likelihood and information criterion as measurements of preference among similar models.

Premium course icon A Quick Guide to Picking the Correct Model

Section 7

The Autoregressive (AR) Model

In this section we’ll introduce the Autoregressive Model and see how well it models market index prices and returns. We’ll discuss how to use the PACF to determine the appropriate number of lags for the model and explore the concept of normalizing values and its impact on model selection.

Premium course icon The AR Model
Premium course icon Examining the ACF and PACF of Prices
Premium course icon Fitting an AR(1) Model for Index Prices
Premium course icon Fitting Higher Lag AR Models for Prices
Premium course icon Using Returns
Premium course icon Analysing Returns
Premium course icon Normalizing Values
Premium course icon Model Selection for Normalized Returns
Show all lessons
Premium course icon Examining the AR Model Residuals
Premium course icon Unexpected Shocks from Past Periods
Show fewer lessons

Section 8

The Moving Average (MA) Model

In this section, we’ll introduce the Moving Average model and see how well it describes price returns. We’ll also have a look at how the MA model performs when dealing with non-stationary data and comment on the mathematical arguments for and against using such models for index prices.

Premium course icon The MA Model
Premium course icon Fitting an MA(1) Model for Returns
Premium course icon Fitting Higher-Lag MA Models for Returns
Premium course icon Examining the MA Model Residuals for Returns
Premium course icon Model Selection for Normalized Returns
Premium course icon Fitting an MA(1) Model for Prices
Premium course icon Past Values and Past Errors

Section 9

The Autoregressive Moving Average (ARMA) Model

In this section, we’ll combine the two models we just examined – the AR and MA – into one: the ARMA. We’ll examine how they synergize and limit the drawbacks each model has on its own. We’ll then talk about the issues that come along with finding the best fitting ARMA model and see how checking the model residuals can be beneficial in model selection.

Premium course icon The ARMA Model
Premium course icon Fitting a Simple ARMA Model for Returns
Premium course icon Fitting a Higher-Lag ARMA Model for Returns - part 1
Premium course icon Fitting a Higher-Lag ARMA Model for Returns - part 2
Premium course icon Fitting a Higher-Lag ARMA Model for Returns - part 3
Premium course icon Examining the ARMA Model Residuals of Returns
Premium course icon ARMA for Prices
Premium course icon ARMA Models and Non-stationary Data

Section 10

The Autoregressive Integrated Moving Average (ARIMA) Model

In this section of the course, we’ll talk about “integration” and integrated models. We’ll explain why and when we use them and when we should avoid them. Here we’ll also briefly explain the idea of “MAX” models and how to add exogenous variables to any time series model.

Premium course icon The ARIMA Model
Premium course icon Fitting a Simple ARIMA Model for Prices
Premium course icon Fitting a Higher Lag ARIMA Model for Prices - part 1
Premium course icon Fitting a Higher Lag ARIMA Model for Prices - part 2
Premium course icon Higher Levels of Integration
Premium course icon Using ARIMA Models for Returns
Premium course icon Outside Factors and the ARIMAX Model
Premium course icon Predicting Stability

Section 11

The ARCH Model

In this section, we’ll talk about the idea of measuring volatility when we’re looking for stability in our investments. We’ll explain the multiple layers of ARCH models and how they differ from the ARMA family of models we just examined. We’ll spend some time discussing the vast functionality of the “arch_model” method and why it’s important to know the default values for many of its arguments.

Premium course icon The ARCH Model
Premium course icon Volatility
Premium course icon A More Detailed Look of the ARCH Model
Premium course icon The arch_model Method
Premium course icon The Simple ARCH Model
Premium course icon Higher Lag ARCH Models
Premium course icon An ARMA Equivalent of the ARCH Model

Section 12

The GARCH Model

In this section of the course, we’ll discuss the Generalized version of the ARCH model, also known as the GARCH. We’ll explore why this model is more widely used, how it outperforms high-order ARCH models and why it looks so similar to the ARMA. We’ll then empirically test the known fact that the GARCH(1,1) is the best model for measuring the volatility of price returns.

Premium course icon The GARCH Model
Premium course icon The ARMA and the GARCH
Premium course icon The Simple GARCH Model
Premium course icon Higher-Lag GARCH Models
Premium course icon The Goal Behind Modeling
MODULE 4

Advanced Specialization

This course is part of Module 4 of the 365 Data Science Program. The complete training consists of four modules, each building up on your knowledge from the previous one. Module 4 is focused on developing a specialized industry-relevant skillset and students are encouraged to complete Modules 1, 2, and 3 before they start this part of the training. Here you will learn how to perform Credit Risk Modeling for banks, Customer Analytics for retail or other commercial companies, and Time Series Analysis for finance and stock data.

See All Modules

Trust the other 276,000 students

Ready to start?
Sign up today for FREE!

Whether you want to scale your career or transition into a new field, data science is the number one skillset employers look for. Grow your analytics expertise and get hired as a data scientist!