Free Download Financial Time Series Analysis for Trading By QuantInsti
Time Series Analysis for Financial Markets: From Theory to Live Trading
Master the essential concepts of time series analysis and learn how to apply them directly in live trading environments. This course covers everything from foundational AR and MA models to advanced approaches like SARIMA, ARCH, and GARCH. Gain the skills to analyze data with characteristics such as seasonality and non-constant volatility, and implement trading strategies across stocks, ETFs, currency pairs, and VXX. Solidify your learning with a capstone project that combines theory, backtesting, and live trading execution.
LIVE TRADING COMPONENT
-
Understand the basics of time series and its key components.
-
Learn to calculate simple, cumulative, and log returns.
-
Apply linear and multivariate regression to stock price data.
-
Conduct correlation analysis on multiple securities, and explore ACF and PACF intuitively and via Python plots.
-
Identify different types of noise and residuals, define stationarity, and review its properties.
-
Build and implement AR, MA, ARMA, ARIMA, SARIMA, ARCH, and GARCH models.
-
Understand volatility, its stylized facts, and the limitations of time series models. Learn strategies to enhance model performance.
-
Backtest and live trade your time series models using real market data, culminating in a capstone project.
SKILLS YOU WILL GAIN
Statistics & Analytics
-
Log Returns
-
Linear Regression
-
Correlation Analysis
-
ACF, PACF, AIC, BIC
-
Goodness of Fit & R-Squared
Time Series Modeling
-
AR, MA, ARMA
-
ARIMA, SARIMA
-
ARCH & GARCH
Python Programming
-
NumPy
-
Pandas
-
Matplotlib
-
Statsmodels
COURSE FEATURES
-
Interactive coding exercises for hands-on learning
-
Capstone project using live market data
-
Collaborative learning: trade and analyze together
PREREQUISITES
This course is ideal for learners who want to implement time series analysis in live trading scenarios. Basic familiarity with Python, particularly NumPy and Pandas, is recommended to follow along with coding examples. Beginners can also take the Python For Trading course on Quantra to build the required Python foundation.
SYLLABUS
Introduction
Understand how one can implement math and statistics in financial markets to create trading strategies. This section also gives an overview of different types of learning units which comprise the course: videos, coding exercises, Python notebooks, quizzes and trading platform integrated units. You would also be taken through the course syllabus which is perfect for beginners in the domain. This entire section is available for free preview.
- Course Introduction
- Course Structure
- Course Structure Flow Diagram
- Quantra Features and Guidance
What is Time Series?
A time series should be recorded periodically and without any gaps. In this section learn what constitutes a time series and what does not. For example, new iPhone model announcements are not periodical and hence are not fit for time series analysis. Further, understand when a time-series analysis should be carried out.
- Introduction to Time Series
- Finding the Time Series
- Frequency in Time Series Analysis
- Data Set in Time Series
- Acquisitions in Time Series
- Why is Time Series Analysis Required?
- Reasons for Time Series Analysis
- When Is Time Series Analysis Not Required?
- Scenario for Not Analysing Time Series
Simple and Cumulative Returns
Perfect section for beginners in finance to get started with. Returns are simply the change in the prices from yesterday. Learn how returns are calculated and further, why simple returns should be multiplied and not added, to give cumulative returns.
- Introduction to Returns
- Analysing Returns or Price
- Simple Daily Returns
- Total Returns
- Cumulative Returns
- Simple or Cumulative Returns
- How to Use Jupyter Notebook?
- Calculating Returns and Cumulative Returns
- Frequently Asked Questions
- Ford Cumulative Returns
Log Returns
Often a confusing concept, we have made log returns intuitive and easier for you to understand. Sometimes a price series changes drastically over a course of time. To get a clear picture of how a time series changes, you use the log prices. Calculate its returns to get the log returns.
- Log Prices
- Log Price Graphs
- Advantage of Log Prices
- Percentage Change in Price
- Total Log Returns
- Log Returns
- Simple or Log Returns
- Daily Log Returns
- Significance of Log Price
- Significance of Log Returns
- Log Prices or Daily Log Returns
- Log Returns
- Calculating Total Log Returns
- Portfolio Returns Calculations
- Portfolio Log Returns
- Portfolio Returns
- Additional Reading
Components of Time Series
Before you implement a financial time series model, you need to understand the different components present in the time series. Learn how to identify components such as trend, mean reversion, seasonality and cyclicality using real market data.
- Components of Time Series
- Identifying Time Series Components
- Trending Time Series
- Mean Reverting Time Series
- Trending or Mean Reverting
- Trending and Mean Reverting Simultaneously
- Cyclical Time Series
- Reason for Cyclicality
- Trending or Cyclical
- Identifying Cyclical Industries
- Seasonal Time Series
- Importance of Seasonality
- Identifying Seasonal Pattern
- Cyclical or Seasonal Time Series
- Seasonal and Trending Simultaneously
Linear Regression
Take your first step in predicting stock prices! If two assets move generally in the same direction at the same time, you can use one asset’s time series to forecast the other. This method is called linear regression. Learn the basic principles of linear regression in this section.
- Linear Regression Fundamentals
- Necessity of Linear Regression
- Predicting Output With Zero Slope
- Graph of Linear Regression
- Linear Relationship
- Scatter Plot
- Linear Regression Model
- Print Model Summary
Types of Errors
Predictions are erroneous! This section details the different types of error calculations. Depending on the linear regression model, there will be data points which lie outside the line. The distance between the fitted line and the datapoint is called error. Learn to understand errors and improve your prediction models going ahead.
- Types of Error Calculations
- Issues With Sum of Errors
- Mean Squared Error Calculation
- Inferring Sum of Squared Errors
- Advantage of Mean Squared Error
- Benefit of SSE Over SAE
- Types of Errors
- Calculate the Error
- Calculate Mean Absolute Error
- Calculate Mean Squared Error
- Error and Outliers
- Calculate Root Mean Squared Error
- Root Mean Squared Error of a Straight Line
- Which is a better RMSE?
- Calculate Mean Absolute Percentage Error
Goodness of Fit
Goodness of fit is used as a criteria for measuring the fitted line’s effectiveness. This section tells us how the goodness of fit is calculated. This will help you judge whether your prediction of the asset is good enough to be converted into a trading strategy.
- Introduction to Goodness of Fit
- Why Goodness of Fit
- Error of a Good Model
- R-Squared Value
- Residual Plot
- Pattern in Residual Plot
- High R-Squared Value
- R-Squared
- Calculate R-Squared
- Limitations of R-Squared
- Assumptions for Linear Regression
- Highest R-Squared
- Linearity
- Not an Assumption for Linear Regression
- Autocorrelation
- Residuals
Multivariate Linear Regression
In this section, you will learn how multiple independent variables can be used to forecast the position of the dependent variable with a live example. You will use two stocks such as Bank of America and Citigroup to forecast the price of a third stock, J.P. Morgan. You will also look at the limitations of the linear regression approach. Depending on the relation between the assets, you can use multiple assets to predict one asset’s price.
- Multivariate Linear Regression
- Selecting Multiple Variables in Model
- Multivariate Linear Regression Equation
- Requirement of Multivariate Linear Regression
- Lagged Version of Own Time Series
- Multivariate Linear Regression Model
- Output of Multivariate Regression Model
- Limitations and Advantages of Linear Regression
- Eliminating Outliers
- Linear and Non-linear Models
- Limitation of Linear Models
- Additional Reading
Correlation Analysis
A widely used statistical concept in finance, correlation analysis helps in establishing a possible relationship between security prices. This in-turn helps in predicting the future price of securities. In this section, you will learn about correlation,how it is different from covariance and how to calculate covariance and correlation coefficients with their limitations.
- Correlation and Covariance
- Calculation of Covariance and Correlation
- Covariance Value
- Correlated Assets
- Direction of the Linear Relationship
- Portfolio Diversification
- Implementation of Correlation Coefficient
- Are Numerical Calculations Exact?
- Calculate the Correlation Coefficient
- Calculate the Rolling Correlation
Autocorrelation and Partial Autocorrelation
These two concepts go hand in hand while modelling time series, autocorrelation and partial autocorrelation. In this section learn about the intuition of ACF and PACF, their differences and how to plot ACF & PACF along their application.
- What is Autocorrelation?
- Autocorrelation
- Autocorrelation Value
- Statistically Significant Values
- Interpretation of ACF plot
- Forecasting Using ACF Plot
- What is Partial Autocorrelation?
- Partial Autocorrelation
- PACF Value
- Model Formation Using PACF Plot
- ACF and PACF Plotting in Python
- Significance of Blue Region in ACF and PACF
- ACF Plot in Python
- PACF Plot in Python
- Additional Reading
Noise
The fourth component of time series, noise, can be caused by either a glitch in the recording process or a temporary deviation from the system. White noise in particular, is the noise remaining after the time series model has been optimised. The presence of white noise in the model indicates that our time series model cannot be optimised further.
- Noise
- Similarity of Returns and White Noise
- Stationarity in White Noise
- Error Plot in White Noise
- Additional Reading
Autoregressive Model
Autoregressive model is based on the linear regression model which assumes past values of a time series have ability to predict future values. In this section, you will learn all about intuition of the autoregressive model, its equation and how to find the optimal lag term for an autoregressive model.
- Overview of Part II
- Autoregressive Model – I
- What is an Autoregressive Model?
- Representation of AR Model
- Autoregressive Model – II
- Prerequisite for AR Model
- Order of AR Model
- Which AR Model to Use?
- Limitations of Using More Lag Terms
Implement Autoregressive Model
By now, you will already be familiar with the AR model. In this section, you will learn to implement it on the financial time series along with the Python packages used for time series forecasting.
- Simple AR Model
- Shift in Predicted Price
- AR Model of Order p
- Train an AR Model of Order p
- Additional Reading
Moving Average Model
The second model in the family of time series models assumes that past error terms have the ability to predict future values. Learn about intuition of MA model, its equation and how to find the optimal lag term for an autoregressive model.
- Moving Average Model
- What is Moving Average Model?
- Predict Price Using MA Model
- Which MA Model to Use?
- What is Definition of MA(2) Model?
- Simple MA Model
- MA Model of Order q
- Generate a Trading Signal
- Additional Reading
ARMA
ARMA is a more advanced model than AR and MA models. In this section, you will learn about the ARMA model, and its equation.
- ARMA Model
- What is ARMA Model?
- Equation of ARMA Model
- Which ARMA Model to Use?
- Caveats of AR, MA and ARMA
Stationarity
A stationary time series is supposed to have constant mean and variance, irrespective of time period. The AR, MA and ARMA models require stationarity for their smooth functioning. In this section, you will learn how to convert a non-stationary financial time series to a stationary time series.
- Stationarity
- Stationarity in Kodak Prices
- Stationarity and Zero Mean
- Changing Variance and Constant Mean
- Single Order Differencing
- Definition of Stationarity
- Identifying Graphs of Stationarity
- Interpret the Output of ADF Test
- Identify the Stationary Series
- ADF Test
- Apply the ADF Test on a Given Series
- Convert Non Stationary Series to a Stationary
- Apply the ADF Test on the Difference of the Series
- Additional Reading
ARIMA Model
A forecasting model that works with non stationary time series. In this section, you will learn about the ARIMA model and its equation. This section also covers finding the optimal order for each parameter associated with the ARIMA model. Finally, you will learn to make a prediction using the ARIMA model.
- ARIMA Model
- Need of ARIMA Model
- Order of Integrated
- Predict Price from Change in Price
- ARMA Model on Non Stationary Data
- Which ARIMA Model to Use?
- Equation of an ARIMA Model
- AIC and BIC
- Getting Started with ARIMA Model
- Should you Apply ARIMA?
- ARIMA Model of Order (p, d, q)
- Correct Order of ARIMA
- Optimal p for ARIMA
- Additional Reading
- Best ARIMA Model Selection
Live Trading on Blueshift
This section will walk you through the steps involved in taking your trading strategy live. You will learn about backtesting and live trading platform, Blueshift. You will learn about code structure, various functions used to create a strategy and finally, paper or live trade on Blueshift.
- Section Overview
- Live Trading Overview
- Vectorised vs Event Driven
- Process in Live Trading
- Real-Time Data Source
- Blueshift Code Structure
- Important API Methods
- Schedule Strategy Logic
- Fetch Historical Data
- Place Orders
- Backtest and Live Trade on Blueshift
- Additional Reading
- Blueshift Data FAQs
Live Trading Template
- Paper/Live Trading ARIMA Strategy
- FAQs for Live Trading on Blueshift
SARIMA Model
SARIMA or Seasonal ARIMA is one step ahead forecasting model than ARIMA. In this section, you learn about SARIMA, and why it is a must-know model in a time series forecasting. This section also covers the representation of SARIMA and how to find the optimal order of its parameters.
- SARIMA Model
- Need of SARIMA Model
- Order of m in SARIMA
- Order of D in SARIMA
Introduction to Volatility
A time series is highly volatile if the price series keeps changing drastically within the time period. In this section, you will learn the definition of volatility and calculate daily and annualised volatility.
- Fundamentals of Volatility
- Definition of Volatility
- Steps in Volatility Calculations
- Importance of Volatility
- Impact of Events on Volatility
- Impact of Recession on Volatility
- Half-yearly Volatility
- Calculate Volatility
- Data to Calculate Volatility
- Why Log Returns While Calculating Volatility?
- Resample Daily Data to Monthly Period
- Calculate the Monthly Volatility
- Convert the Monthly Volatility to Annualised Volatility
- Half-Yearly Volatility to Annualised Volatility
Stylised Facts and Importance of Volatility
In this section, you will learn the stylised facts of volatility such as volatility clustering, mean-reversion, long memory and leverage effect. You will also learn about its importance as a risk indicator and how it can be used to trade the volatility index (VIX)
- Stylised Facts of Volatility
- Selecting Stylised Facts
- Mean-reverting Behaviour of Volatility
- Returns and Volatility
- Reason for Asymmetry in Volatility
- Applications of Volatility
- Differentiating Historical and Implied Volatility
- Calculating Implied Volatility
- Implied Volatility and SP500
- Trading VIX
- Usage of Volatility
ARCH
The volatility of the real world financial data usually changes with time. Learn how to use the ARCH model to predict the volatility of an asset using its past returns.
- Need for the ARCH and GARCH model
- Effect of Returns on Volatility
- Model Selection: Volatility in a Range
- Model Selection: Volatility Not in a Range
- Introduction to the ARCH Model
- Components of the ARCH Model
- Returns-Volatility Relationship
- Equation of the ARCH Model
- Derivation of the ARCH Model
- Identify the Correct ARCH Equation
- Implementation of the ARCH Model
- Define the ARCH Model
- Forecasting using the ARCH Model
- Performance Analysis of the ARCH Model
- Summarise the ARCH Model
- Compute the ARCH Volatility
- Additional Reading
GARCH
The ARCH model is generalised further to include the asset returns and past volatility. Learn how to use the GARCH model to predict the volatility and then use the prediction in a trading strategy.
- Implementation of the GARCH Model
- Volatility Clustering
- Components of the GARCH Model
- Implementation of the GARCH Model
- Finding the Optimal Lag
- Performance Analysis of the GARCH Model
- Summarise the GARCH Model
- Compute the GARCH Volatility
- Trading Strategy using the GARCH Model
- Generate the Strategy Signal
- Additional Reading
Capstone Project
In this section, you will undertake a capstone project on real-world data. This project will require you to apply and practice the concepts learnt throughout this course.
- Capstone Project: Getting Started
- Problem Statement
- Frequently Asked Questions
- Template Code Files
- Working With Pickle File
- Model Solution: TSA Capstone Project
- Capstone Solution Downloadable
Limitations
Time series analysis has a wide variety of applications and acceptance in the quant community, it is not perfect. In this section, you will go through the limitations inherent in time series and also ways to overcome them.
- Limitations of Time Series Analysis
- Limitations in Methodology
- Impact of Events on Price Data
- Additional Reading
Future Enhancements
In this section, you will look at the present scenario of time series analysis and go through a few pointers on how to improve our existing time series models.
- Future Enhancements
- Exogenous and Endogenous Variables
- Identifying X in SARIMAX
- Stylised Fact of Volatility in EGARCH
- Working of Pairs Trading
- Identifying Additive Trends
- Applying Exponential Models
- Additional Reading
Automate Trading Strategy Using IBridgePy
- Additional Reading
- Sample Strategy to Run on Interactive Brokers
Run Codes Locally on Your Machine
Learn to install the Python environment in your local machine.
- Python Installation Overview
- Flow Diagram
- Install Anaconda on Windows
- Install Anaconda on Mac
- Know your Current Environment
- Troubleshooting Anaconda Installation Problems
- Creating a Python Environment
- Changing Environments
- Quantra Environment
- Troubleshooting Tips For Setting Up Environment
- How to Run Files in Downloadable Section?
- Troubleshooting For Running Files in Downloadable Section
Course Summary
This section will give a brief summary of the course and the different concepts and models you have worked on in this course. All the codes and data files are also available as a zip file in this section.
- Course Summary
- Python Code and Data
About the Author
QuantInsti®
QuantInsti is a global leader in algorithmic and quantitative trading education, with registered users across more than 190 countries and territories. Founded by the creators of iRage, one of India’s top high-frequency trading (HFT) firms, QuantInsti has spent over a decade helping traders and professionals grow through its comprehensive learning ecosystem and practical financial applications.
Why Choose Quantra®?
-
Efficient Learning: Gain more knowledge in less time.
-
Learn from Practitioners: Courses are designed and taught by industry experts.
-
Flexible Pace: Learn at your own speed with on-demand content.
-
Hands-On Practice: Access real data and strategy models to implement and test independently.


