In recent years,with the rapid development of science and technology,the traditional financial market is deeply affected by emerging technologies,resulting in a large number of quantitative investment methods based on algorithms and mathematical statistics.Its performance has far exceeded that of traditional investment methods.Financial professionals are happy to look for market rules and use relevant algorithms and computer programming techniques to automatically capture market opportunities.This article will focus on a very specific quantitative investment method-Hidden Markov algorithm.This algorithm is a very classic algorithm in machine learning and has a unique dual random process.It contains a sequence that can be observed directly and a hidden state sequence that cannot be observed directly,and the former can be used to infer the state of the latter,which is very similar to the market structure.In the financial market,we can observe prices,volume,and a series of indicators directly calculated by the former two.However,we can not directly observe quotes such as rising,falling,and shocks.But these quotes are very important because people are buying and selling based on them to make profits.This thesis will use the Gaussian Hidden Markov Model to model the financial high frequency HSI 1min data.Firstly,six hidden states are selected,and the combination of the classical technical indicators RSI,1min logarithmic rate of return and 5min logarithmic rate of return are entered as observation variables into the model,and then quantitative timing is performed by interpreting the hidden state’s meaning.Backtesting results show that the model achieved positive returns in all testing periods,and the winning percentage basically reached 50%,and the Sharpe ratio also showed higher values.This thesis also made further optimization to the established model to find better strategies.We traverse some common classical technical indicators,and seperately combine them with the 1 min logarithmic rate of return,5 min logarithmic rate of return as an input observation variable,and get the technical indicator which has the best backtest performance.Then,we optimize the number of implicit states on the optimal model obtained by enumeration.Finally,after empirical analysis,it is found that in the 1min data of the Hang Seng Index,the model which select eight hidden states,and choose the MFI,1min logarithmic rate of return,and 5 min logarithmic rate of return as the input observation variable has the best timing effect.The backtesting indicators such as Sharpe ratio and return on earnings are all at a very high level.The modeling results of the Hidden Markov algorithm derived from financial high-frequency data confirm that the algorithm has a strong potential for timing in the day.At the same time,using the technical indicators and logarithmic returns as input observation variables provides a new perspective for the algorithm’s modeling in the financial market. |