The Hong Kong University of Science and Technology course "Python and Statistics for Financial Analysis" by Prof. Xuhu Wan on Coursera (Feb. 2023).
Week 1 - Visualizing and Munging Stock Data
Why do investment banks and consumer banks use Python to build quantitative models to predict returns and evaluate risks?
What makes Python one of the most popular tools for financial analysis? You are going to learn basic python to import,
manipulate and visualize stock data in this module. As Python is highly readable and simple enough, you can build one of
the most popular trading models - Trend following strategy by the end of this module!
1.0 Module Introduction
1.1 Packages for Data Analysis
1.2 Importing data
1.3 Basics of Dataframe
1.4 Generate new variables in Dataframe
1.5 Trading Strategy
Week 2 - Random variables and distribution
In the previous module, we built a simple trading strategy base on Moving Average 10 and 50, which are
"random variables" in statistics. In this module, we are going to explore basic concepts of random variables.
By understanding the frequency and distribution of random variables, we extend further to the discussion of
probability. In the later part of the module, we apply the probability concept in measuring the risk of
investing a stock by looking at the distribution of log daily return using python. Learners are expected
to have basic knowledge of probability before taking this module.
2.0 Module Introduction
2.1 Outcomes and Random Variables
2.2 Frequency and Distributions
2.3 Models of Distribution
Week 3 - Sampling and Inference
In financial analysis, we always infer the real mean return of stocks, or equity funds, based on the historical data
of a couple years. This situation is in line with a core part of statistics - Statistical Inference - which we also
base on sample data to infer the population of a target variable.In this module, you are going to understand the basic
concept of statistical inference such as population, samples and random sampling. In the second part of the module, we
shall estimate the range of mean return of a stock using a concept called confidence interval, after we understand the
distribution of sample mean.We will also testify the claim of investment return using another statistical concept -
hypothesis testing.
3.0 Introduction
3.1 Population and Sample
3.2 Variation of Sample
3.3 Confidence Interval
3.4 Hypothesis Testing
Week 4 - Linear Regression Models for Financial Analysis
In this module, we will explore the most often used prediction method - linear regression. From learning the association
of random variables to simple and multiple linear regression model, we finally come to the most interesting part of this
course: we will build a model using multiple indices from the global markets and predict the price change of an ETF of
S&P500. In addition to building a stock trading model, it is also great fun to test the performance of your own models,
which I will also show you how to evaluate them!
4.0 Introduction
4.1 Association of random variables
4.2 Simple linear regression model
4.3 Diagnostic of linear regression model
4.4 Multiple linear regression model
4.5 Evaluate the strategy
Xuhu Wan Associate Professor - The Hong Kong University of Science and Technology
Xuhu Wan is an Associate Professor of Statistics in Department of Information Systems, Business Statistics and Operation Management at HKUST. He received his Ph.D. in Financial Mathematics from the University of Southern California in 2005. His research interest lies primarily in the area of dynamic contract theory and information design. The second area of interest is parallel and distributed computing and low-latency programming.
HKUST - A dynamic, international research university, in relentless pursuit of excellence, leading the advance of science and technology, and educating the new generation of front-runners for Asia and the world.