Pairs trading is a market-neutral investment strategy widely used by hedge funds and investment banks because of its ability to obtain low-risk returns.Complete short selling mechanism is the necessary condition to realize the pairs trading strategy.Chinese futures market has complete short selling mechanism and ‘T+0’ trading mechanism,which is very suitable for the practice of pairs trading strategy.With the continuous penetration of the new generation of artificial intelligence technology into the research field of financial markets,the application of machine learning in financial markets has become a new research hotspot.Studies have shown that it is feasible and effective to use machine learning algorithm to predict price fluctuations in financial markets,which is of great significance to improve the performance of pairs trading strategy.Therefore,this paper designs a pairs trading strategy based on machine learning algorithm,and conducts empirical research on it in Chinese commodity futures market,aiming to study a better performance commodity futures pairs trading strategy.The strategy is divided into forming period and trading period.In the forming period,the OPTICS clustering algorithm is used for clustering analysis to search the candidate combination.Then the candidate combination is analyzed by co-integration analysis,and the combination with co-integration relationship and the most frequent spreads regression is selected as the target combination of the transaction;In the trading period,the price information of the combination and the volume information of the combination are used as the characteristic input of the LSTM neural network model to predict the spreads trend of the combination.According to the prediction results and the fixed threshold,the trading signal is triggered to complete the opening and closing of the strategy.The empirical results in Chinese commodity futures market show that the pairs trading strategy based on machine learning algorithm obtains an average annualized return of 15.94%,Sharp ratio of 1.6078 and information ratio of1.9595 in the sample,and an average annualized return of 10.84%,Sharp ratio of1.5511 and information ratio of 1.6790 outside the sample.The robustness test and effectiveness test show that the strategy has certain robustness and effectiveness.Compared with the classical pairs trading strategy,the strategy has the advantage of stronger profitability. |