股票市场的预测一直是一个具有挑战性的问题,其波动会受国家政策、公司财报、行业表现、投资者情绪等因素的影响。本文基于股市图像(Stock Charts)方法将股票的连续时间信息进行处理,根据不同的信息丰富度以及预测时间间隔将原始数据分为了多个类别,依次作为深度卷积神经网络(Deep Convolutional Neural Network, DCNN)训练集;并利用深度卷积神经网络对股票市场进行预测,分析在不同分类方法下的精度差异。结果表明,当在标记间隔为30天,使用包含成交量的蜡烛图作为输入时,对美国NDAQ交易所的股票走势预测可以达到59.7%的准确度。
The prediction of the stock market has always been a challenging issue, because many factors will cause the market uncertainty such as national policies, company financial reports, industry per-formance, investor sentiment, social media sentiment, and economic factors. In this paper, based on the stock charts method, the continuous time stock information is processed. According to different information richness, prediction time interval and classification method, the original data is divided into multiple categories as the training set of DCNN (Deep Convolutional Neural Network). The re-sults show that the method has the best performance when the forecast time interval is 30 days. Moreover, this method can accurately predict the stock trend of the US NDAQ exchange for 59.7%.
获取数据后,需要对数据进行预处理,提取数据信息,本文选用了金融数据的可视化方法,即烛台图对股票数据预处理。将历史时间序列数据,使用Python中的Matplotlib库 [22] 将其转换为烛台图。本研究中使用的烛台图如图4所示,其基于不同的标记进行对比实验。为了分析不同预测间隔与预测准确度之间的关系,本文基于不同的预测间隔(1个、20个、30个、60个和90个交易日后的close差值)对每张蜡烛图进行标记,计算方法如式(1),当 c l o s e i + d < c l o s e i 时, t a r g e t i = 0 ,当 c l o s e i + d > c l o s e i 时, t a r g e t i = 1 。本文所用烛台图均含60天信息量 [23]。
t arg e t i = s i g n ( c l o s e i + d − c l o s e i ) (1)
周乔,刘宁宁,沈灵聪. 基于股票图像与CNN的股价预测模型研究A Stock Price Prediction Model Based on Stock Charts and Deep CNN[J]. 金融, 2020, 10(04): 334-342. https://doi.org/10.12677/FIN.2020.104034
参考文献ReferencesMalkiel, B.G. and Fama, E.F. (1970) Efficient Capital Markets: A Review of Theory and Empirical Work. The Journal of Finance, 25, 383-417. <br>https://doi.org/10.1111/j.1540-6261.1970.tb00518.xJung, C. and Boyd, R. (1996) Forecasting UK Stock Prices. Applied Financial Economics, 6, 279-286.
<br>https://doi.org/10.1080/096031096334303魏巍贤, 周晓明. 中国股票市场波动的非线性GARCH预测模型[J]. 预测, 1999(5): 47-49.李海涛. 运用马尔科夫预测法预测股票价格[J]. 统计与决策, 2002(5): 25-26.Prado, H.D., Ferneda, E., Morais, L.C.R., et al. (2013) On the Effectiveness of Candlestick Chart Analysis for the Brazilian Stock Market. Procedia Computer Science, 22, 1136-1145. <br>https://doi.org/10.1016/j.procs.2013.09.200吴泽兵. 基于A股市场的K线形态量化分析[J]. 广西质量监督导报, 2018(11): 63-64.杜兵. 基于蜡烛图的择时策略在我国创业板股票中的研究[J]. 科技经济导刊, 2019, 27(3): 16-17.Litjens, G., Kooi, T., Bejnordi, B.E., et al. (2017) A Survey on Deep Learning in Medical Image Analysis. Medical Image Analysis, 42, 60-88. <br>https://doi.org/10.1016/j.media.2017.07.005Kamilaris, A. and Prenafeta-Boldú, F.X. (2018) Deep Learning in Agriculture: A Survey. Computers and Electronics in Agriculture, 147, 70-90. <br>https://doi.org/10.1016/j.compag.2018.02.016孙剑, 张一豪, 王俊骅. 基于自然驾驶数据的分心驾驶行为识别方法[J/OL]. 中国公路学报: 1-17.
https://kns.cnki.net/kcms/detail/61.1313.u.20200512.1104.002.html, 2020-07-02.Honchar, O. and Di Persio, L. (2016) Artificial Neural Networks Approach to the Forecast of Stock Market Price Movements. International Journal of Economics and Management Systems, 1, 158-162.Jiao, Y. and Jakubowicz, J. (2017) Predicting Stock Movement Direction with Machine Learning: An Extensive Study on S&P 500 Stocks. 2017 IEEE International Conference on Big Data (Big Data), Boston, 11-14 December 2017, 4705-4713. <br>https://doi.org/10.1109/BigData.2017.8258518Sismanoglu, G., Onde, M.A., Kocer, F., et al. (2019) Deep Learning Based Forecasting in Stock Market with Big Data Analytics. 2019 Scientific Meeting on Electrical-Electronics & Biomedical Engineering and Computer Science (EBBT), Istanbul, 24-26 April 2019, 1-4. <br>https://doi.org/10.1109/EBBT.2019.8741818Rasekhschaffe, K.C. and Jones, R.C. (2019) Machine Learning for Stock Selection. Financial Analysts Journal, 75, 70-88. <br>https://doi.org/10.1080/0015198X.2019.1596678Zhang, X., Zhang, Y., Wang, S., Yao, Y., Fang, B. and Philip, S.Y. (2018) Improving Stock Market Prediction via Heterogeneous Information Fusion. Knowledge-Based Sys-tems, 143, 236-247.
<br>https://doi.org/10.1016/j.knosys.2017.12.025Morris, G.L. and Litchfield, R. (1995) Candlestick Charting Ex-plained: Timeless Techniques for Trading Stocks and Futures. McGraw-Hill, New York.Lu, T.-H., Shiu, Y.-M. and Liu, T.-C. (2012) Profitable Candlestick Trading Strategies—The Evidence from a New Perspective. Review of Fi-nancial Economics, 21, 63-68. <br>https://doi.org/10.1016/j.rfe.2012.02.001Wang, J., Zheng, T., Lei, P., et al. (2019) A Hierarchical Convolution Neural Network (CNN)-Based Ship Target Detection Method in Spaceborne SAR Imagery. Remote Sensing, 11, 620. <br>https://doi.org/10.3390/rs11060620Sharifzadeh, F., Akbarizadeh, G. and Seifi Kavian, Y. (2019) Ship Classification in SAR Images Using a New Hybrid CNN-MLP Classifier. Journal of the Indian Society of Remote Sensing, 47, 551-562.
<br>https://doi.org/10.1007/s12524-018-0891-yBao, S. and Chung, A.C.S. (2018) Multi-Scale Structured CNN with Label Consistency for Brain MR Image Segmentation. Computer Methods in Biomechanics and Biomedical Engi-neering: Imaging & Visualization, 6, 113-117.
<br>https://doi.org/10.1080/21681163.2016.1182072乔若羽. 基于神经网络的股票预测模型[J]. 运筹与管理, 2019, 28(10): 132-140.Hunter, J.D. (2007) Matplotlib: A 2D Graphics Environment. Computing in Science & En-gineering, 9, 90-95.
<br>https://doi.org/10.1109/MCSE.2007.55程智胜. 股票市场突发行为的数据挖掘[D]: [硕士学位论文]. 武汉: 华中师范大学, 2019.