Abstract
Research in the economics field has extensively documented the impact of media sentiments on the stock market. Sentiment analysis, as a tool to predict equity prices, has been popularized in the past years. Recently, Twitter has received a lot of attention due to the diversity of opinions on social media platforms. A common obstruction to sentiment analysis is the resource gap between English and other languages. This pilot study examines the effect of polyglotism in tweets concerning bilingual companies and develops a model that extracts sentiments from polyglot tweets to make price predictions. Results suggest that taking non-English tweets into consideration decreases errors in price predictions and that the random forest models have higher performance than linear regression models. The results of this pilot study need to be confirmed with larger sets of data.
Introduction
Sentiment analysis has become a cornerstone of modern financial forecasting, yet it frequently suffers from a significant "resource gap." Most sentiment analysis models are heavily optimized for English, creating a blind spot for "bilingual companies"—firms headquartered in multilingual hubs like Montreal that serve a diverse, non-English-speaking customer base. When a substantial portion of the public discourse occurs in languages other than English, English-only models ignore critical market signals.
This pilot study addresses this gap by investigating "intratextual polyglotism"—the mixing of languages within social media. By "homogenizing" data through translation before analysis, this research tests whether incorporating non-English tweets improves the accuracy of stock price predictions.
Methodology
The study utilized a multi-stage pipeline to compare the predictive power of monolingual versus polyglot datasets.
Data Acquisition and Preprocessing
Tweets were scraped via the Twitter API over a 35-day period (late November to late December 2022), focusing on three Quebec-based companies: Desjardins, Bell, and LightspeedHQ. Financial data, including adjusted closing prices to account for dividends and splits, were sourced from Yahoo Finance.
To handle the informal nature of social media text, the preprocessing stage involved:
- Normalization: Using Python’s
Unicodelibrary to remove diacritic symbols (e.g., accents, cedillas). - Cleaning: Applying regular expressions to strip noise and irrelevant characters.
Sentiment Extraction and Modeling
The core variable in this experiment was the inclusion of non-English text. In the "Polyglot" model, the Google Translate API converted all French and Spanish tweets into English. The control model simply ignored non-English text.
Sentiment was extracted using the VADER (Valence Aware Dictionary and Sentiment Reasoner) lexicon, which is specifically tuned for social media shorthand and emojis. Finally, the study compared two machine learning techniques—Linear Regression and Random Forest Regression—to predict price changes based on the ratio of positive to negative sentiment.
Results and Discussion
The inclusion of non-English tweets significantly enhanced model performance by capturing "polarized" emotions that were previously invisible. The translated dataset identified an additional 2% of polarized sentiment (positive or negative) that the untranslated model categorized as neutral or discarded.
Model Performance and Error Reduction
The results demonstrated a clear advantage for polyglot models:
- Mean Square Error (MSE): Incorporating non-English tweets reduced MSE by 25.8% for Linear Regression and 13.6% for Random Forest models.
- Directional Accuracy: The polyglot models correctly predicted the direction of price changes (up or down) in 4 out of 6 trading days, doubling the accuracy of the untranslated models (2 out of 6).
- Algorithm Comparison: Random Forest models outperformed Linear Regression, showing an 18.4% lower MSE than Linear Regression on untranslated data and a 5.0% lower MSE on translated data. This suggests that Random Forest is better equipped to handle the non-linear relationship between social media volume and market fluctuations.
Behavioral Insights
The findings align with the behavioral economics concept of loss aversion, which posits that the psychological impact of losses is greater than that of gains. This suggests that negative sentiment on social media may exert a disproportionately strong influence on stock prices compared to positive sentiment.
Limitations and Future Work
As a pilot study, several limitations must be acknowledged. The sample size was constrained to 35 days and approximately 25 trading days due to Twitter API limitations. Furthermore, the current model does not account for "bots" or spam, which can artificially inflate sentiment scores through mass retweeting.
Future research should aim for larger datasets and explore the use of native sentiment lexicons for French and Spanish. While translation is an effective bridge, using native-language tools may capture even finer linguistic nuances, further closing the resource gap in global sentiment analysis.
Summary updated