How Financial News Can Be Used to Train Good Financial Models 📰 Numbers tell you what happened, but news tells you why. I’ve written an article explaining how news can be used to train AI models for sentiment analysis and better forecasting. Hope you find it interesting!
Given a news title, it calculates a sentiment score : if the score crosses a certain threshold, the strategy decides to buy or sell. Each trade lasts one day, and the strategy then computes the daily return. For Tesla the best model seems to be the regression 👀 Just a quick note: the model uses the closing price as the buy price, meaning it already reflects the impact of the news.
How Financial News Can Be Used to Train Good Financial Models 📰 Numbers tell you what happened, but news tells you why. I’ve written an article explaining how news can be used to train AI models for sentiment analysis and better forecasting. Hope you find it interesting!
Given a news title, it calculates a sentiment score : if the score crosses a certain threshold, the strategy decides to buy or sell. Each trade lasts one day, and the strategy then computes the daily return.
Just a quick note: the model uses the closing price as the buy price, meaning it already reflects the impact of the news. If I had chosen the opening price, the results would have been less biased but less realistic given the data available.
I found it excellent and very well done. One of the best explanations of embedding I've ever read. Well done, @hesamation! Had to share this: hesamation/primer-llm-embedding
Finally, I uploaded the model I developed for my master’s thesis! Given a financial event, it provides explained predictions based on a dataset of past news and central bank speeches. Try it out here: SelmaNajih001/StockPredictionExplanation (Just restart the space and wait a minute)
While Hugging Face offers extensive tutorials on classification and NLP tasks, there is very little guidance on performing regression tasks with Transformers. In my latest article, I provide a step-by-step guide to running regression using Hugging Face, applying it to financial news data to predict stock returns. In this tutorial, you will learn how to: -Prepare and preprocess textual and numerical data for regression -Configure a Transformer model for regression tasks -Apply the model to real-world financial datasets with fully reproducible code
Predicting Stock Price Movements from News 📰📈 I trained a model to predict stock price movements (Up, Down, Neutral) from company news. Dataset: Articles linked to next-day price changes, covering Apple, Tesla, and more. Approach: Fine-tuned allenai/longformer-base-4096 for classification. Outcome: The model captures the link between news and stock movements, handling long articles and producing probability scores for each label. Comparison: Shows promising alignment with stock trends, sometimes outperforming FinBERT. Feel free to try the model and explore how news can influence stock predictions SelmaNajih001/SentimentAnalysis