SentiTrader is a medium-frequency trading bot that utilizes sentiment analysis from news articles to make trading decisions. The bot scrapes data from r/worldnews and employs machine learning models to predict stock market trends, testing its accuracy on an Alpaca paper trading account.
๐ Machine Learning Models
The core of SentiTrader relies on machine learning models trained on sentiment analysis data to predict market trends. Models used:
- Random Forest
- Multilayer Perceptron (MLP)
- Linear Discriminant Analysis (LDA)
These models were trained and evaluated using sentiment-labeled financial news data.
๐ Full implementation available on Kaggle
โจ Features
- Web scraping news articles from r/worldnews for sentiment analysis.
- Predictive analysis powered by ML models.
- Integrated with Alpaca for live paper trading.
- Achieved approximately 12% annualized returns (currently in testing phase).
๐ Files
ai.pyโ Contains AI model and trading logic.bot.pyโ Core trading bot implementation.scraper.pyโ Web scraping and data extraction.sentiment.pyโ Sentiment analysis logic.trader.pyโ Bot control and trading strategy.
๐ Getting Started
- Clone the repository:
git clone https://github.com/KoralK5/SentiTrader.git