Recycling Assistance
A Sentiment Analysis Approach to Enhance Bunker Fuel Trading Decisions
Team project / 02.AUG.2024
Project Overview
Problem Statement
Approach & Hypothesis
Data
Model
Analysis
Results and Future Work
This project aimed to create a tool to automate decision-making for bunker fuel brokers by analyzing economic news articles. By doing so, the project sought to enhance trading efficiency and improve decision-making.
We focused on how economic news sentiment could potentially predict oil price fluctuations, using cutting-edge NLP techniques.
Key technologies : Google ELECTRA model for sentiment analysis, Python for data preprocessing, and Investing.com for data collection.
Manually analyzing news articles to make informed trading decisions is time-consuming and prone to error. The project aimed to address this by automating the sentiment analysis of economic news to support brokers in making timely and informed decisions.
The price of oil is influenced by a complex array of factors, including global economic trends, production decisions by oil-producing countries, seasonal factors, natural disasters, international conflicts, and U.S. oil production.
We focused exclusively on global economic news, hypothesizing that the sentiment within these articles could predict oil price movements.
Data Collection
Model Selection
Sentiment Analysis Results
Results :
Conclusion :
Future Work :
Oil Price Analysis
Correlation Analysis
Training & Validation
Training Parameters :
Validation Results :
Test Results :
Data Preprocessing
We preprocessed around 11,700 sentiment-labeled data points using Python, Pandas, NLTK, and regular expressions.
We selected Google ELECTRA for its high performance and efficiency in training. It is 45 times faster than the BERT base model, making it suitable for our smaller dataset.
The model was fine-tuned specifically for sentiment analysis on economic news articles, helping us classify news sentiment as positive, negative, or neutral.
We analyzed 2018 economic news data to identify sentiment trends over time.
To address variability in daily news volume, we calculated a “positive rate” (the ratio of positive news articles to total articles per day).
Visual: A graph showing the positive rate over the course of 2018, highlighting days with high and low sentiment.
The analysis revealed a weak correlation between economic news sentiment and oil prices, indicating that oil prices are influenced by a broader range of factors beyond just economic news.
The project demonstrates the potential of using NLP and sentiment analysis in bunker fuel trading decisions. Although the initial correlation was weak, this approach lays a strong foundation for further research and tool development. Enhancing the model by considering a wider range of data and refining the methodology will be key to achieving more accurate predictions.
To improve predictive accuracy, it’s essential to expand the dataset to include news from various categories such as politics and environmental factors.
Incorporating a time lag between news events and oil price reactions may better capture delayed effects.
Exploring the impact of different types of oil could account for varying influences on their prices.
We converted the 2018 Brent oil price data into daily percentage changes, allowing us to visualize price trends over the year.
Visual: A graph showing daily oil price changes, with significant rises and falls marked for clarity.
We compared the sentiment analysis results with the oil price changes to determine any correlation.
Findings:
Correlation between average positive rate and oil price change: 0.09 (indicating a weak correlation).
Percentage of days with matching directions in sentiment and price change: 53.94%.
Visual: Combined graph showing both sentiment trends and oil price changes for easier comparison.
These results demonstrate the model’s effectiveness in accurately predicting sentiment based on economic news.
Batch size: 32
Epochs: 10
Loss: 0.4345
Accuracy: 84.59%
Macro F1 Score: 82.24%
Loss: 0.3953
Accuracy: 85.10%
Macro F1 Score: 82.88%
Removal of stopwords like “is” and “the” to focus on meaningful words.
News Data : We collected approximately 10,000 global economic news articles from Investing.com using the Octoparse web scraping tool.
Oil Price Data: Brent crude oil prices were selected as the benchmark due to its continuous pricing and relevance in global markets.
The data spanned from 2018 to 2019, a period chosen to avoid distortions caused by the COVID-19 pandemic.
Removal of non-recognizable languages (e.g., Latin, Spanish).
Elimination of special characters, retaining only alphabets, numbers, and specific punctuation.
Reduction of consecutive spaces to a single space.
Removal of stopwords like “is” and “the” to focus on meaningful words.
Hypothesis:
If the sentiment in economic news is predominantly positive, oil prices are likely to rise; if predominantly negative, oil prices may decline.