Astock: A New Dataset and Automated Stock Trading based on Stock-specific News Analyzing Model (2022)

Abstract: Natural Language Processing (NLP) demonstrates a great potential to support financial decision-making by analyzing the text from social media or news outlets. In this work, we build a platform to study the NLP-aided stock auto-trading algorithms systematically. In contrast to the previous work, our platform is characterized by three features: (1) We provide financial news for each specific stock. (2) We provide various stock factors for each stock. (3) We evaluate performance from more financial-relevant metrics. Such a design allows us to develop and evaluate NLP-aided stock auto-trading algorithms in a more realistic setting. In addition to designing an evaluation platform and dataset collection, we also made a technical contribution by proposing a system to automatically learn a good feature representation from various input information. The key to our algorithm is a method called semantic role labeling Pooling (SRLP), which leverages Semantic Role Labeling (SRL) to create a compact representation of each news paragraph. Based on SRLP, we further incorporate other stock factors to make the final prediction. In addition, we propose a self-supervised learning strategy based on SRLP to enhance the out-of-distribution generalization performance of our system. Through our experimental study, we show that the proposed method achieves better performance and outperforms all the baselines’ annualized rate of return as well as the maximum drawdown of the CSI300 index and XIN9 index on real trading. Our Astock dataset and code are available at https://github.com/JinanZou/Astock .

## introduction the stock prediction has been an attractive task for a long time, and it is still challenging since the stochasticity of the market and behavior patterns of participators are fluctuating and elusive. stock forecasting based on natural language processing (nlp) techniques is a promising solution since text information, e.g., tweets, financial news etc., is strongly correlated with the stock prices. however, the nlp-based stock forecasting research is still scattered without unified definitions, benchmark datasets, clear articulations of the tasks, which severaly hinders progress of this field. existing approaches are usually based on market sentiment analysis @xcite and use news to predict the related securities' price on the following trading day(s) @xcite . despite the limited success in those studies, the existing works are still far from realistic for two reasons: firstly, previous methods ignore the financial factors, which plays a key role in practical trading. secondly, these models are evaluated only on intermediate performance metric, e.g., stock movement prediction accuracy. it is unclear how well they can support a practical trading system to make sufficient profit. to address the problems above, we construct a china a-shares market dataset with news and stock factors called astock. specifically, we an-notate all occurrences of the three trading actions (long, preserve, short) in 40,963 news originated from tushare foot_0 with a valid official license, which describes the major financial events. the dataset also includes various stock factors to build a realistic system. based on astock, we establish a semantic role labeling pooling (srlp) to build a compact representation for stock-specific news and predict the stock movement. this work also explores how to leverage a self-supervised method better to upgrade the srlp method, which achieves better performance for classification and high domain generalization ability. in experiments, we further propose a realistic trading platform that outperforms the state-of-theart text classification baseline's average returns and sharpe ratios over the csi300 index and xin9 index of testing period from january 2021 to november 2021. specifically, we analyze the profitability of the proposed strategy based on stock movement prediction result for real trading as shown in figure 1 . the primary contributions of this work can be summarized as follows: ## methodology this section describes the technical contribution of this work: a novel system for stock movement prediction. our system consists of two major components: semantic role labeling pooling method and a self-supervised learning based on srlp, we will elaborate on those two parts. the green arrow represents a duplicate for the srlp. the final result is generated from the stock movement classifier, and the total loss is obtained from the self-supervised srlp part and supervised stock movement classification part. ## experiments in this section, we conduct experiments to evaluate the performance of the proposed model. we conduct experiments on two different splits of our dataset for each model: in-distribution split and out-of-distribution split. we also feed the prediction result of our method to the proposed trading strategy to analyze the profitability through backtesting on real-world stock data. ## conclusion in this paper, we study the problem of nlp-based stock movement prediction and build a platform with a new dataset, astock, featured by: (1) large number of stocks, stock-relevant news. (2) availability of various financial factors. (3) financialrelevent metrics for evaluation. the platform is based on two novel techniques. one leverages propbank-style semantic role labeling results to create compact news representation. building on top of this representation, the other technique is a customized self-supervised learning training strategy for improving generalization performance. we demonstrate that the proposed method achieves superior performance over other baselines through extensive experiments in both in-distribution and outof-distribution settings. also, by feeding our prediction to a practical simulated trading, our method achieves better profitability in backtesting.