量化投资/金融数据分析 Quantitative Investment (2023)

Factor models, empirical tests of technical analysis indicators, applications of machine learning techniques

❗️通知 Announcement❗️

  • 🎉🎉 5月9日: 感谢各位同学的课程评价!

    课程评价部分统计报告(截止至2023年5月9日)

  • 4月12日: 考试题已布置。请于4月26日中午12点前提交。考题:exam.pdf。数据:data.zip
  • 3月21日: 作业3已布置。请于4月05日中午12点前提交。
  • 量化投研实践讲座。时间:3月29日18:30。嘉宾:孙子文, 国联证券研究所量化研究员。腾讯会议号:579-655-025
  • 3月07日: 作业2已布置。请于3月22日中午12点前提交。
  • 2月22日: 作业1已布置。请于3月8日中午12点前提交。
  • 2月10日: 选课的同学请参与此关于编程基础的问卷调查。

1. 课程大纲 Syllabus

详细内容 Details

这门课程在教学计划上有两个不同的名称:《量化投资》(学硕),《金融数据分析和Python应用》(专硕)。主要讨论用数量方法探索金融数据以及构建交易策略。课程内容是应用导向的,但相关的理论也会有涉及。课程目标:掌握基本的工具以及用数据分析的思维方式。这门课主要包含以下内容:

  • Python 基础以及数据处理相关库(numpy, pandas, sklearn, tensorflow, keras等)
  • 因子模型
  • 技术分析介绍以及统计检验
  • 机器学习在量化投资中的应用

这门课暂不包含高频数据(日内)策略,也不包含衍生品策略。主要的数据来源是中国A股市场股票数据

This is a course about constructing trading strategies by quantitative methods. The course is application oriented, but relevant theories will also be discussed. The course objective is to teach students basic tools and ways of exploring financial data so that quantitative (and perhaps winning) strategies can be constructed. The main contents are:

  • introduction of Python basics and data science packages (numpy, pandas, sklearn, tensorflow, keras, etc.)
  • construction of factor models
  • introduction to technical analysis
  • application of machine learning methods

This course does not contain high-frequency (intraday) strategies, or strategies involving derivatives . Please refer to other courses provided by the school if these are what you need. Our main data is from A shares of China’s stock markets.

1.1 知识储备 Prerequisites

应当知道基本的计量经济学(如必要我们会进行简短的复习)。无需具备编程知识,所有的编程相关的内容都会在课程中介绍,但如果有编程经验更好。面对大量的编程应当有心理准备。

Students should know basic econometrics (I’ll give short review lectures if necessary). Students must also be comfortable, or inclined to do lots of programming. No prior knowledge of programming is required, though it is surely a big plus if you have some experiences.

1.2 课本和参考书 Textbook and References

暂无课本。课件和相关资料会上传到这个网页,请每次上课前进行下载。我们采用的平台是优矿,请至相关网页下载客户端。优矿有免费版但分配的计算资源很少,学院会提供一些共享账号。参考书目见下方。

There is no required textbook. Lecture notes will be uploaded here and please download the latest version before class. We’ll be using Uqer, a quant platform, for retrieving data, programming and backtesting. Please download and install it on your laptop. The platform is not free, but we’ll give you several shared accounts.

The following references are useful:

  • Cochrane, John H., 2005, Asset Pricing. Revised edition. (Princeton University Press, Princeton, N.J).
  • Bali, Turan G., Robert F. Engle, and Scott Murray, 2016, Empirical Asset Pricing: The Cross Section of Stock Returns. 1 edition. (Wiley).
  • 石川, 刘洋溢, & 连祥斌. (2020). 因子投资:方法与实践. 电子工业出版社.
  • Murphy, John J., 1999, Technical Analysis of the Financial Markets: A Comprehensive Guide to Trading Methods and Applications. (New York Institute of Finance, N.Y.).
  • Grinold, Richard, and Ronald Kahn, 1999, Active Portfolio Management: A Quantitative Approach for Producing Superior Returns and Controlling Risk. 2 edition. (McGraw-Hill Education, New York).
  • Geron, Aurelien, 2019, Hands-on Machine Learning with Scikit-Learn, Keras, and TensorFlow. 2nd Edition (O’Reilly).

1.3 评分方式 Grading

(暂定,可能会有所改动)

  • 3到4次作业 (60%)
  • 家庭考试 (40%)。大致形式为在规定时间内完成策略构建。

(preliminary, may be subject to changes)

  • 3 or 4 homework exercises (60%)
  • take-home exam (40%)

抄袭作业零容忍。抄袭他人作业可能会直接挂科。 对于编程经验较少的同学来说,遇到困难是正常的。所有的代码我都会共享,只要仔细研读一定可以完成作业和考试。请相信自己。

PLAGIARISM IS STRICTLY PROHIBITED. You may immediately fail the course if copy-pasting other’s work. It will be normal to meet obstacles during the course, especially for students with less exposure to programming. I’ll share all relevant codes and you’ll surely complete the course successfully if you read and try the provided codes with some care. Please trust yourself and hang on.

 

2. 课程内容 Contents

Lecture Date Topics Materials Readings Homework
1 Feb 13, 14 1. General introduction
2. Introduction to Python
Intro.pdf
Python_intro.ipynb
Python_intro.html
others.zip
[Video-Lec1]
廖雪峰的Python教程
2 Feb 20, 21 1. Introduction to data science packages
2. Introduction to backtesting platforms (Uqer)
np_pd_plot.ipynb
np_pd_plot.html
strategy_example_202302.ipynb
strategy_example_202302.pdf 优矿客户端下载地址
[Video-Lec2]
pandas' user guide
优矿相关文档
ex1.zip (due: Mar.08 noon)
3 Feb 27, 28 1. Exploratory data analysis
2. Introduction to factor models and related econometrics
Newey-West.pdf
econometrics_summary.pdf
1-EDA.ipynb
1-EDA.html
[Video-lec3]
Cochrane (2005), Ch. 12
Newey & West (1987)
石川, 刘洋溢, & 连祥斌. (2020). 因子投资:方法与实践, Ch. 2
4 Mar 6, 7 Fama-French 3 factors 2-sort_FMreg_on_beta_size.ipynb
2-sort_FMreg_on_beta_size.html
3-FF3.ipynb
3-FF3.html
[Video-lec4]
Fama & French (1992)
Fama & French (1993)
Lee et al. (2017)
Liu et al. (2019)
ex2.pdf (due: Mar.22 noon)
5 Mar 13, 14 1. Other common factors: Momentum, Reversal, Liquidity, Volatility
2. Applications of factor models
other_factors.zip
backtest.zip
factor_application.zip
factor_func.py
bootstrap.zip
[Video-lec5]
See refs in lecture notes
6 Mar 20, 21 1. Introduction to technical analysis and related econometrics
2. Statistical tests of technical analysis indicators
技术分析的基本思想和统计检验.pdf
7-ta_test.html
7-ta_test.ipynb
[Video-lec6]
See refs in lecture notes ex3.pdf (due: Apr.05 noon)
7 Mar 27, 28 Introduction to Machine Learning methods 7-crs_and_timing.ipynb
ML.pdf
entropy.pdf
[Video-lec7]
Géron (2019)
8 Apr 3, 4 Applications of Machine Learning to factor models and technical analysis Wu et al.pdf
pca.pdf
8-factor_ML.ipynb
8-factor_ML.html
8-ta_ML.ipynb (4月6日更新, RSI指标计算有错。感谢庄源同学。)
8-ta_ML.html (4月6日更新, RSI指标计算有错。感谢庄源同学。)
[Video-lec8]
Gu et al. (2020)
Leippold (2021)
Exam 考题将于4月12日布置 exam.pdf
data.zip

Back to top