TradeMood is a Python-based, web-accessible dashboard for real-time financial market sentiment analysis and trading decision support. Built with Streamlit, it integrates sentiment analysis using a pre-trained RoBERTa model (finiteautomata/bertweet-base-sentiment-analysis), fetches market data and social media content, generates trading signals, and tracks trades for financial instruments like gold futures (GC=F). Still requires fine tuning.
- π₯οΈ Interactive Web Dashboard powered by Streamlit.
- π Real-Time Sentiment Analysis using a RoBERTa-based model.
- π Trading Signal Generation based on sentiment trends (BUY, SELL, HOLD).
- π° Trade Management with position tracking and P&L calculation.
- π Scheduled Sentiment Pipeline every 5 minutes during COMEX hours.
- ποΈ SQLite Database for caching and trade history.
- π Detailed Trade History with styled P&L metrics.
β οΈ Robust Error Handling and logging.- π Modular Architecture for easy extension.
- π Market Data Integration (e.g., Yahoo Finance
GC=F). - π§ͺ Unit Tests for key components.
TradeMood/
βββ README.md
βββ requirements.txt
βββ LICENSE
βββ trademood/
β βββ core/
β β βββ database_handler.py
β β βββ error_handler.py
β β βββ trade_tracker.py
β β βββ models/
β β β βββ sentiment_result.py
β β β βββ trading_signal.py
β β β βββ trend_signal.py
β β βββ sentiment/
β β β βββ analyzer.py
β β β βββ fetcher.py
β β β βββ pipeline.py
β β β βββ trend_generator.py
β β β βββ signal_generator.py
β βββ api/
β β βββ sentiment_api.py
β βββ dashboard/
β β βββ app.py
β βββ tests/
β βββ test_sentiment.py
βββ scripts/
β βββ run_dashboard.py
βββ data/
β βββ sentiment_cache.db
βββ examples/
β βββ config.yaml
βββ docs/
βββ screenshots/
- Python 3.10.5
- Virtual environment (recommended)
- SQLite database
- API keys (Yahoo Finance, X API, etc.)
pip install -r requirements.txtFrom the project root (where setup.py is):
pip install -e .streamlit run scripts/run_dashboard.pyAccess the dashboard at: http://localhost:8501
- View Sentiment Trends for
GC=F - Check Trading Signals (BUY, SELL, HOLD)
- Manage Trades: Open/close positions, track P&L
- Review History in styled trade table
- Edit
config.yamlfor API and symbols
- β
Gold Futures (
GC=F) - π§ Add more via
fetcher.pyandtrade_tracker.py
- Add new instruments in
fetcher.py,trade_tracker.py - Change model in
analyzer.py - Extend API in
sentiment_api.py
pytest trademood/tests/
- π More instruments (stocks, forex, crypto)
- π§ Multi-language sentiment models
- πΌ Live broker integration
- βοΈ Config UI
git clone https://github.com/your-username/TradeMood.git
cd TradeMoodMIT License β see LICENSE.
- Email: a.k.y.dorgham@gmail.com
- GitHub Issues: TradeMood Issues
- Connect: LinkedIn | GoogleScholar | ResearchGate | ORCiD
- No automated order execution
- Limited offline functionality
- SQLite not suited for large data
- Sentiment model limitations