摘要
通过对股票收益率的统计分析,建立离散型隐马尔可夫模型(HMM),从而实现了对股票价格的预测。首先,计算某支股票一段时间内当天收盘价相对于前一天收盘价的收益率,再将其收益率按照等距离离散化,作为HMM的输入;其次,通过Baum-Welch算法训练HMM的参数,然后利用Viterbi算法得出观察序列对应的最优隐状态序列;最后,根据状态转移矩阵和输出概率矩阵求出后一天收益率的概率分布,并通过加权计算得出后一天的收益率,再通过收益率计算出对应的股票价格。实验结果表明:基于离散型的隐马尔可夫模型可以更好地预测未来的股价。
This paper proposes a stock price forecasting method based on discrete Hidden Markov Model(HMM).Firstly,the yield of the closing price of a stock over the previous day relative to the closing price of the previous day is calculated,and then its yield according to the equidistant distance as the input of the HMM is discretized.Secondly,the parameters of the HMM are performed by the Baum-Welch algorithm.After training,the Viterbi algorithm is used to obtain the corresponding optimal hidden state sequence.Finally,the probability distribution of the next day’s rate of return is obtained according to the state transition matrix and the output probability matrix,and the yield of the next day is obtained by weighting,and combined with day’s closing price,so the closing price of the stock on the following day can be calculated.The experimental results show that this method can better predict future stock prices.
作者
张旭东
黄宇方
杜家浩
缪永伟
ZHANG Xudong;HUANG Yufang;DU Jiahao;MIAO Yongwei(College of Computer Science and Technology,Zhejiang University of Technology,Hangzhou 310023,China;College of Information Engineering,Zhejiang Sci-Tech University,Hangzhou 310018,China)
出处
《浙江工业大学学报》
CAS
北大核心
2020年第2期148-153,211,共7页
Journal of Zhejiang University of Technology