We develop an open-source tool (EmTract) that extracts emotions from social media text tailed for financial context. To do so, we annotate ten thousand short messages from a financial social media platform (StockTwits) and combine it with open-source emotion data. We then use a pre-tuned NLP model, DistilBERT, augment its embedding space by including 4,861 tokens (emojis and emoticons), and then fit it first on the open-source emotion data, then transfer it to our annotated financial social media data. Our model outperforms competing open-source state-of-the-art emotion classifiers, such as Emotion English DistilRoBERTa-base on both human and chatGPT annotated data. Compared to dictionary based methods, our methodology has three main advantages for research in finance. First, our model is tailored to financial social media text; second, it incorporates key aspects of social media data, such as non-standard phrases, emojis, and emoticons; and third, it operates by sequentially learning a latent representation that includes features such as word order, word usage, and local context. Using EmTract, we explore the relationship between investor emotions expressed on social media and asset prices. We show that firm-specific investor emotions are predictive of daily price movements. Our findings show that emotions and market dynamics are closely related, and we provide a tool to help study the role emotions play in financial markets.
翻译:我们开发了一个开源工具(EmTract),用于从面向金融语境的社交媒体文本中提取情感。为此,我们标注了来自金融社交媒体平台(StockTwits)的一万条短消息,并将其与开源情感数据结合。随后,我们采用预调优的自然语言处理模型DistilBERT,通过纳入4,861个标记(包括表情符号与颜文字)扩展其嵌入空间,并首先在开源情感数据上训练该模型,再将其迁移至我们标注的金融社交媒体数据中。我们的模型在人工标注数据及ChatGPT标注数据上均优于其他开源最先进情感分类器(如Emotion English DistilRoBERTa-base)。与基于词典的方法相比,该方法在金融研究中具有三大优势:第一,模型专为金融社交媒体文本定制;第二,整合了社交媒体数据的关键要素,如非标准短语、表情符号与颜文字;第三,通过顺序学习包含词序、词汇用法及局部语境特征在内的潜在表征进行运算。利用EmTract,我们探讨了社交媒体中投资者情感与资产价格之间的关系,结果表明公司特定投资者情感能预测每日价格波动。我们的发现显示情感与市场动态密切相关,并提供了一个工具以帮助研究情感在金融市场中的作用。