Accurate prediction of stock market trends,including stock price movements,is crucial for economic growth and government macroeconomic management. It helps monitor and guide the stable operation of the stock market while reducing market risks. To address the significant non⁃stationarity and high noise characteristics of stock time series,as well as challenges such as data delays and missing values in practical applications,a meta⁃deep learning hybrid model,Meta⁃LSTM (Meta⁃Learning⁃Long Short⁃Term Memory),is proposed. By leveraging prediction tasks based on similar stocks,the model achieves rapid generalization for target stock price prediction tasks through meta⁃learning,effectively addressing the problem of limited target stock data. Additionally,the model incorporates prediction errors and target stock features into the LSTM module,and optimizes the dynamic allocation of feature weights using the SE⁃MHA (Squeeze⁃and⁃Excitation Network⁃Multi⁃Head Attention) mechanisms. This approach enhances the model's ability to capture critical patterns in time series data. Experiments on the stock data from Shanghai Stock Exchange demonstrate that the Meta⁃LSTM model exhibits better stability and generalization,with prediction accuracy increasing by 5%~16% compared to other models.
近年来,股市预测任务的研究逐渐结合了多种机器学习方法,以提升预测精度.Zhang et al[3]基于深度学习理论,根据中国顶尖企业的特点构建了股票价格预测指标体系,采用LSTM循环神经网络来预测中国的顶尖企业.程孟菲和高淑萍[4]通过深度迁移学习训练堆叠LSTM,结合移动平均法,提出多尺度股价预测TELM模型.Ghosh et al[5]使用随机森林和CuDNN⁃LSTM来预测S&P 500成分股的日内方向性变化,并提出多特征设置.
股市预测任务并非通过单一的机器学习模型就可以实现准确预测,需要综合多种机器学习模型.Kumar et al[6]利用β⁃SARMA(基于Beta分布的季节性自回归移动平均模型)捕捉时间序列中的线性季节性动态结构,进一步由LSTM进行建模.Erdoğan et al[7]通过格兰杰分布检验分析了清洁能源股票与贵金属价格的因果关系.王晴[8]构建了多种预测模型,基于均方误差最小的变权组合,应用于沪深300指数的预测.
元学习(Meta⁃Learning),也称为Learning to Learn,是一种基于任务的学习方法,其目标是通过对多个任务的学习来改进学习算法,使其能够快速适应新的任务.
元学习有两个阶段:元训练和元测试.在元训练阶段,模型使用大量任务进行训练,这些任务称为源任务.在元测试阶段,在新任务上测试模型性能,这些新任务称为目标任务.Shi et al[11]提出一种基于MAML思想的元学习框架,用有限的数据来预测细分市场的需求.Chang et al[12]对于股价预测,采用模型无关元学习(MAML)来进行模型训练.通过这些研究,可以把股票价格预测视为一个元学习问题.
2.3 长短期记忆模型⁃注意力机制
2.3.1 LSTM模型
LSTM作为循环神经网络(Recurrent Neural Network,RNN)的变体,通过门控机制有效解决了RNN中的梯度消失与爆炸问题,如图1所示.LSTM通过门控机制来缓解长序列依赖问题,已被Zhu et al[13]用于如股票价格预测等时间序列任务.
ShahJ, VaidyaD, ShahM. A comprehensive review on multiple hybrid deep learning approaches for stock prediction. Intelligent Systems with Applications,2022,16:200111.
[2]
SirishaU M, BelavagiM C, AttigeriG. Profit prediction using ARIMA,SARIMA and LSTM models in time series forecasting:A comparison. IEEE Access,2022,10:124715-124727.
[3]
ZhangY, TumibayG B,et al.Stock market prediction model based on LSTM deep learning:The case of top corporate company in China∥2022 4th International Conference on Artificial Intelligence and Advanced Manufacturing. Hamburg,Germany:IEEE,2022:451-455.
GhoshP, NeufeldA, SahooJ K. Forecasting directional movements of stock prices for intraday trading using LSTM and random forests. Finance Research Letters,2022,46 (part A):102280.
[6]
KumarB,Sunil, YadavN. A novel hybrid model combining β SARMA and LSTM for time series forecasting. Applied Soft Computing,2023,134:110019.
[7]
ErdoğanS, GedikliA, ÇevikE İ,et al. Precious metals as safe⁃haven for clean energy stock investment:Evidence from nonparametric Granger causality in distribution test. Resources Policy,2022,79:102945.
[8]
王晴. 组合模型在股票价格预测中应用研究. 计算机仿真,2010,27(12):361-364.
[9]
ShojaieA, FoxE B. Granger causality:A review and recent advances. Annual Review of Statistics and Its Application,2022,9(1):289-319.
[10]
LippeP, MagliacaneS, LöweS,et al. CITRIS:Causal identifiability from temporal intervened sequences∥Proceedings of the 39th International Conference on Machine Learning. Baltimore,MD,USA:PMLR,2022:13557-13603.
[11]
ShiJiatu, YaoHuaxiu, WuXian,et al. Relation⁃aware metalearning for E⁃commerce market segment demand prediction with limited records∥Proceedings of the 14th ACM International Conference on Web Search and Data Mining. New York,NY,USA:Association for Computing Machinery,2021:220-228.
[12]
ChangS H, HsuC W, LiH Y,et al. Short⁃term stock price⁃trend prediction using meta⁃learning∥2021 IEEE International Conference on Systems,Man,and Cybernetics. Melbourne,Australia:IEEE,2021:2900-2905.
[13]
ZhuT, LiaoY, ZhengT. Predicting Google's stock price with LSTM Model. Proceedings of Business and Economic Studies,2022,5(5):82-87.
[14]
HuJ, ShenL, SunG.Squeeze⁃and⁃excitation networks∥Proceedings of 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City,UT,USA:IEEE,2018:7132-7141.
GunjalR, NayyerS S, WaghS R,et al. Granger causality for prediction in dynamic mode decomposition:Application to power systems. Electric Power Systems Research,2023,225:109865.
[17]
RokhsatyazdiE, RahnamayanS, AmiriniaH,et al. Optimizing LSTM based network for forecasting stock market∥2020 IEEE Congress on Evolutionary Computation. Glasgow,United Kingdom:IEEE,2020:1-7.
[18]
HuY, TaoZ, XingDongao,et al. Research on stock returns forecast of the four major banks based on ARMA and GARCH model∥Proceedings of the 3rd International Symposium on Big Data and Applied Statistics. Kunming,China:IOP Publishing,2020:012075.
[19]
FafoutellisP, LañaI, SerJ D,et al. A causal deep learning framework for traffic forecasting∥2023 IEEE 26th International Conference on Intelligent Transportation Systems. Bilbao,Spain:IEEE,2023:5047-5053.
[20]
PhuruanK, KasemsetC. Shallot price forecasting model using hybrid ARIMA⁃LSTM model. Data Science and Engineering,2022,3(1):35-43.
[21]
ZhuR, YangY, ChenJ.XGBoost and CNN⁃LSTM hybrid model with attention⁃based stock prediction∥2023 IEEE 3rd International Conference on Electronic Technology,Communication and Information. Changchun,China:IEEE, 2023:359-365.