In order to cope with sudden changes in market style, the author designed and implemented an investment system. In response to the inability to cope with sudden changes in market style, the author proposed an improved scheme when using a classifier for training, using a hidden Markov model to select time points in the same market state as the training samples for the classifier. The results of backtesting and real market testing show that the improved investment system can capture changes in market style, and during the testing period, the test results obtained higher returns compared to the pre improved classifier. At present, the investment system implemented by the author has become the core backend module of the officially launched intelligent investment advisory product Zhiyu Liangtou APP, providing strong investment decision-making suggestions for small and medium-sized investors. In the future, we can provide backend support for more user end products.