| Quantitative funds,which use quantitative trading strategies,are currently one of the most important financing methods in the financial market.With the increasing rationalization,value,and maturity of the A-share market in China,as well as the rapid development of network IT,the use of the new generation of artificial intelligence in quantitative investment methods will achieve great success in the future.By utilizing the powerful information processing capabilities of computers,investors can more accurately screen for fund targets that meet their own needs,effectively avoiding the occurrence of investment blind spots,and effectively suppressing the negative effects of personal emotions,preferences,and other factors on trading results,thereby achieving the goal of rational investment.This article takes the daily trading data of the latest constituent stocks of the Shanghai and Shenzhen 300 from January 1,2010,to December 31,2022,as the research object,and selects six categories of 85 factors such as valuation,quality,growth,risk,sentiment,and technology to build a factor library.Through factor validity testing using correlation filtering,information coefficient(IC),and information ratio(IR)indicators,finally 20 factors that have passed the test are selected as feature factors for model training to predict the trend of stocks.Secondly,four models in machine learning are used to predict the trend of individual stocks and formulate corresponding stock selection strategies.Based on the high and low probabilities of stock price increase predicted,the stocks are ranked in descending order and the top ten stocks are selected to construct the investment portfolio on a daily basis.At the same time,the Transformer model is used to predict the closing price of the benchmark index,judge the overall market situation,capture trading signals,determine the timing of position control,and combine the stock selection strategy to construct the factor stock selection and quantitative timing strategy in this article.The strategy is backtested from July 1,2022,to December 31,2022.The results show that the constructed initial strategy can stably outperform the benchmark returns.The Transformer model performs the best,and the backtesting of the strategy based on this model obtains a backtesting return of 14.37%,an annualized return of 31.08%,and an excess return of 27.69%,with a Sharpe ratio of 1.21 and a maximum drawdown of only 13.40%.The performance of the Extreme Gradient Boosting Tree(XGBoost)model is second-best,followed by the Gradient Boosting Decision Tree(GBDT)model,and the Random Forest model performs the worst.Overall,the differences in the classification prediction results among the models are not significant,indicating that in actual stock selection,the model is only a tool,and the decisive factors are still our ability to handle massive data and strategy design.Next,we optimized our strategy from the aspects of stock selection and timing,and the results showed that the fusion of the four models for stock selection and the increase in the number of considerations for quantitative timing can indeed enhance the effectiveness of the strategy.Finally,based on the optimized strategy,we constructed the final strategy for backtesting and performed validity tests on the strategy through out-of-sample testing and sample selection testing,and the results showed that the final strategy constructed in this article passed the validity tests.Through the backtesting,optimization and effectiveness testing of strategies,this paper puts forward important references and ideas for future quantitative investment research,and realizes the combination of machine learning and quantitative investment. |