2  课程简介和资源

数据分析与经济决策 课程旨在通过数据分析方法,帮助学员在复杂的经济环境中做出更为科学的决策。课程内容涵盖数据获取、数据处理、数据分析与建模等多个方面,力求让学员掌握数据分析的全流程。

本课程的主要特色是,借助 AI 编写数据分析报告和代码,提升学员的工作效率和分析能力。对于每一个数据分析项目,我们会首先通过探索性数据分析,明确分析目标和问题,进而制定分析方案,以便将复杂的问题拆解成若干个小问题,每个小问题都可以用逻辑清晰的提示词加以描述。在此基础上,我们只需利用 AI 工具快速生成数据处理和分析的代码,最后生成可视化报告。

当然,上述过程并非一蹴而就,而是需要不断的迭代和优化。学员需要根据实际情况调整分析思路和方法,以便更好地应对复杂的经济问题。

因此,在学习过程中,不必过分纠结于某一个具体的实现细节,而是要关注整体的分析思路和框架。更为重要的是,要多花时间了解各类统计和计量方法的原理和适用场景,以便在设定分析方案时,能够综合运用多种方法展开分析,从不同角度解读数据。

2.1 课程内容

  • Part I:数据分析
    • 数据获取:API, 爬虫, 数据库
    • 数据结构:数据框、系列、矩阵、结构化v.s.非结构化
    • 数据清洗:合并、纵横变换、变量生成与转换
    • 数据清洗:缺失值、离群值、文字变量
    • 可视化:直方图、类别变量、散点图、三维图、动图
    • 复现报告:Markdown, Jupyter Notebook
  • Part II:建模
    • 统计基础和假设检验
    • 线性回归分析:OLS,虚拟变量,交乘项,高阶项
    • 面板数据模型:高维固定效应模型、DID
    • 再抽样方法:Bootstrap, Jackknife, Cross-validation, Monte Carlo Simulation
    • 因果推断:AB-test, 反事实架构, 逆概率加权, 匹配, Double Machine Learning
    • 机器学习:K 近邻, Lasso,随机森林,支持向量机, Logit

2.2 参考资料

2.2.1 AI tools

  • Awesome AI for Economists
    • A curated list of AI tools, libraries, and resources for economics research, teaching, and policy analysis.
  • Gábor Békés. (2026). Doing Data Analysis with AI. Link.

Author Gábor Békés, Central European University (Austria, EU)

Published January 30, 2026

2.2.2 Python 语言

  • Allen Downey, 2012. Think Python: How to Think Like a Computer Scientist. -PDF-
    • Python 入门,通俗易懂
  • Johansson, R., 2024, Numerical Python: Scientific Computing and Data Science Applications with Numpy, SciPy and Matplotlib. Apress Berkeley, CA. Link, PDF (需要用校园 ID 登录), github
    • Python 入门,绘图,科学计算,偏微分方程,统计和机器学习初步
    • CHAPTER 4 Plotting and Visualization, 介绍绘图的基本元素.
  • QuantEcon. Link, github
    • QuantEcon is a nonprofit organization dedicated to development and documentation of open source computational tools for economics, econometrics, and decision making.

2.2.3 数据分析

  • Wes McKinney, 2022. Python for Data Analysis: Data Wrangling with pandas, NumPy, and Jupyter (3E). Online-Read, github, gitee-码云
    • 专注于数据处理,讲的比较细致
    • 作者是 pandas 的作者,书中介绍了 pandas 的使用方法
  • 🍎 PDSH   VanderPlas, 2023. Python Data Science Handbook, github, Online-Read, PDF-2E
    • 数据分析 + 可视化 + 机器学习
    • 提供了 Colab版本,可以无需安装 Python,直接在线运行
    • 本地已经下载:VanderPlas_2023_PDSH_Python_Data_Science_Handbook-2E.pdf
  • Github 仓库:数据分析

2.2.4 金融

  • Scheuch, C., Voigt, S., Weiss, P., & Frey, C. (2024). Tidy Finance with Python (1st ed.). Chapman and Hall/CRC, Online-Read, github

    • tidyfinance package
    • 股票回报, CAPM, 投资组合, Fama-French 因子模型等
    • 整体上比较简单,依赖于作者开发的 tidyfinance 扩展包。
  • Mastering Python for Finance – Second Edition, github

  • Hilpisch Y., Python for Finance. 2019. -PDF-, github

  • Machine Learning for Algorithmic Trading, 2nd edition. github, Website

2.2.5 因果推断和机器学习

  • Nick Huntington-Klein. The Effect: An Introduction to Research Design and Causality, Link, github, Slides-Causality, Slides-Econometrics

    • 以因果图和反事实框架为基础,介绍了一些常用的因果推断方法,包括:DID,TWFE,SCM,RDD,PSM,Matching,Panel 等;配有在线阅读版本和 GitHub 代码仓库。
  • Facure, Matheus (2022). Causal Inference for The Brave and True. Link. GitHub.

    • Note: 覆盖 IV、DID、SDID、PSM、Matching、Panel、SCM、RDD;包含完整 Jupyter Notebook;使用 causalmldowhy
  • James, G., Witten, D., Hastie, T., & Tibshirani, R. (2023). An Introduction to Statistical Learning: With Applications in Python (ISLP). Springer. Link. Python 资源与实验. GitHub. PDF.

    • Note: 经典入门教材,强调统计学习与 Python 实现;配有在线实验材料、GitHub 代码与 PDF 版本,适合课程教学、自学与 Notebook 演示。
  • Tatsat, H., Puri, S., & Lookabaugh, B. (2020). Machine Learning and Data Science Blueprints for Finance. O’Reilly Media. GitHub. Binder. PDF.

    • Note: 面向金融场景的机器学习实战书;包含资产定价、风险管理、时间序列与交易策略等案例;配套 GitHub 仓库,且可通过 Binder 在线运行。
  • Chollet, François (2021). Deep Learning with Python (2nd ed.). Manning. Link. GitHub.

    • Note: Keras 作者撰写的深度学习教材,偏重实践与代码示例;适合快速上手神经网络、计算机视觉与序列模型。
  • Buduma, N., & Papa, J. (2022). Fundamentals of Deep Learning. PDF.

    • Note: 深度学习基础读物,适合初学者建立整体框架;可作为神经网络、训练机制与常见模型结构的入门材料。
  • Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press. Link. TensorFlow Exercises. Slides. PDF1. PDF2.

    • Note: 深度学习领域的代表性教材,系统覆盖前馈网络、卷积网络、序列模型、优化与概率图模型;配有官网、练习资源与课件。

2.3 分析工具

  • 请预先安装 VScode 编辑器和 Anaconda 套装,并确保相关环境配置正确。详情参见 软件安装和环境配置
  • 我们会在 VScode 中使用 Jupyter Notebook (.ipynb 文档) 编写 Python 和 Stata 代码,并添加 Markdown 格式的解释文本。参见 Jupyter Notebook 的使用。若不熟悉 Markdown 语法,可以参考 Markdown 简介