信息教学创新21年10期

基于 Python 的金融时间序列 ARIMA 模型教学
孙义¹,周陇陇²
(1. 安徽财经大学 金融学院,安徽 蚌埠 233030;2. 河北地质大学 城市地质与工程学院,河北 石家庄 050031)

摘  要:针对非平稳时间序列建模教学的研究现状,提出一种基于 Python 的金融时间序列预测方法。以招商银行股票收盘价为例,通过 Python 的 tusahre 模块采集自 2020 年 7 月 1 日至 2021 年 4 月 9 日的数据作为样本数据,采用 Python 的 ARIMA模块建立预测模型,然后通过该预测模型对自 2021 年 4 月 12 日至 2021 年 6 月 9 日这一期间招商银行的股票收盘价进行预测研究。结果表明,该方法实现了金融时间序列预测的可视化,有利于 Python 和 ARIMA 的教学和推广应用。


关键词:ARIMA;时间序列;Python 语言;教学信息化



DOI:10.19850/j.cnki.2096-4706.2021.10.050


基金项目:安徽财经大学博士人才创新研究 引导基金(85051)


中图分类号:TP311.1;G434                               文献标识码:A                               文章编号:2096-4706(2021)10-0192-04


Teaching of Financial Time Series ARIMA Model Based on Python

SUN Yi 1 ,ZHOU Longlong2

(1.School of Finance,Anhui University of Finance & Economics,Bengbu 233030,China; 2.School of Urban Geology and Engineering,Hebei GEO University,Shijiazhuang 050031,China)

Abstract:Aiming at the research status of non-stationary time series modeling teaching,a financial time series prediction method based on Python is proposed. Taking the closing price of China Merchants Bank as an example,the data from July 1,2020 to April 9, 2021 are collected by tusahre module of Python as sample data,and ARIMA module of Python is called to establish a prediction model. Then the prediction model is used to predict the closing price of China Merchants Bank from April 12,2021 to June 9,2021. The results show that this method realizes the visualization of financial time series prediction,and is conducive to the teaching,popularization and application of Python and ARIMA.

Keywords:ARIMA;time series;Python language;teaching informatization


参考文献:

[1] 刘惠好,焦文妞,刘悦 . 监管新规对我国上市银行股价的 影响——基于 ARIMA 模型的政策干预分析 [J]. 财经理论研究, 2020(5):21-31.

[2] 陈浩,兰燕鸿,何郁波 . 基于 ARMA 模型的股票开盘价 分析及预测 [J]. 吉首大学学报(自然科学版),2020,41(5): 86-91.

[3] 闯跃龙,郭文平 . 面向非计算机专业学生的 Python 教学 内容设计 [J]. 台州学院学报,2018,40(3):56-60.

[4] 谢克武 . 大数据环境下基于 python 的网络爬虫技术 [J]. 电子制作,2017(9):44-45.

[5] 郭丽蓉 . 基于 Python 的网络爬虫程序设计 [J]. 电子技术 与软件工程,2017(23):248-249.

[6] 陈博闻 . 基于技术指标及 ARIMA 模型预测股票价格—— 以中国平安保险集团公司股票调整后的收盘价为例 [J]. 统计与管 理,2021,36(7):53-57.

[7] 王周伟,陶志鹏,张元庆 . 基于 Spatial AIC 准则的空间 自回归模型变量选择研究 [J]. 数理统计与管理,2019,38(1): 69-80.

[8] 杨炳铎,汤教泉 . 中国债券收益率的可预测性检验 [J]. 系 统工程理论与实践,2019,39(4):970-985.

[9] 刘天,姚梦雷,黄继贵,等 . 组合预测模型在丙型病毒性 肝炎发病率预测中的应用 [J]. 中国疫苗和免疫,2018,24(6): 674-679.

[10] 闫宇,吴海涛 . 基于 ARIMA 模型的纳斯达克指数短期 预测 [J]. 信息与电脑(理论版),2020,32(20):155-158.

[11] 王英伟 马树才 . 基于 ARIMA 和 LSTM 混合模型的时间 序列预测 [J]. 计算机应用与软件,2021(2):291-298.


作者简介:孙义(1980—),男,汉族,北京人,高级工程 师,博士,研究方向:机器学习与金融科技;周陇陇(1992—), 女,汉族,安徽合肥人,硕士研究生在读,研究方向:工程建模 与管理。