Chronox is a tool that fetches stock data, processes it, predicts future prices using machine learning models, and presents the results via a Discord bot.
- Fetches historical stock data using yfinance.
- Calculates various technical indicators (like MA, EMA, MACD, RSI, Bollinger Bands).
- Trains ML models (XGBoost, Prophet) to predict future stock prices.
- Integrates with a Discord bot for easy interaction:
- Fetch data (
!fetchStock) - Generate predictions (
!predict[Xgboost|Prophet|Lightgbm]) - Display calculated features (
!stockFeatures) - Show prediction charts (
!chart) - For more commands use
!help
- Fetch data (
- Includes sentiment analysis from news headlines to potentially adjust predictions (
!newsEnabled). - Offers data cleanup capabilities.
- Python 3.x
- Dependencies listed in
requirements.txt. Install them using:pip install -r requirements.txt
- A Discord Bot Token.
-
Configuration:
- Make sure you have a Discord bot token.
- You can set the token in a
config.jsonfile (create one if it doesn't exist) like this:{ "discord": { "token": "YOUR_DISCORD_BOT_TOKEN" } } - Alternatively, set the
CHRONOX_DISCORD_TOKENenvironment variable.
-
Run the main script:
python src/main.py
This will start the Discord bot.
A Dockerfile is included in the project. You can build and run the application in a container:
- Build the image:
docker build -t chronox . - Run the container (make sure to pass your Discord token):
docker run -e CHRONOX_DISCORD_TOKEN="YOUR_DISCORD_BOT_TOKEN" chronox
You can find prebuilt images on Dockerhub: https://hub.docker.com/repository/docker/jakstein/chronox
This project is licensed under the MIT License.
