A tool for analyzing financial markets using deep learning. This platform predicts stock price movements with an LSTM model and analyzes market sentiment from news articles using FinBERT. It's all wrapped up in an interactive Streamlit dashboard and a FastAPI backend.
- Stock Price Prediction: LSTM model to forecast future stock prices.
- Sentiment Analysis: FinBERT model to analyze financial news sentiment.
- Interactive Dashboard: Streamlit app for visualizing data and predictions.
- REST API: FastAPI backend to serve model predictions.
- Containerized: Docker support for easy setup.
| Category | Technology |
|---|---|
| Backend | FastAPI, Uvicorn |
| Frontend | Streamlit |
| Deep Learning | PyTorch, Hugging Face Transformers |
| Data | Pandas, NumPy, Scikit-learn, yfinance |
| Deployment | Docker |
-
Clone the repo
git clone https://github.com/LUCKYREDDY31/financial-market-intelligence.git cd financial-market-intelligence -
Run the setup script
./setup.sh
This will create a virtual environment, install dependencies, download data, and train the models.
-
Activate the environment
source venv/bin/activate
-
Run the dashboard
streamlit run app/dashboard.py
The app will be available at
http://localhost:8501. -
Run the API
python src/api/main.py
The API will be available at
http://localhost:8000with docs at/docs.
-
Build the image
docker build -t market-intelligence . -
Run the container
docker run -p 8501:8501 market-intelligence
The app will be available at
http://localhost:8501.
financial-market-intelligence/
├── app/ # Streamlit dashboard
├── src/
│ ├── api/ # FastAPI backend
│ ├── data_processing/ # Data download & features
│ ├── models/ # LSTM & FinBERT
│ └── train_models.py # Training script
├── data/ # Data storage
└── Dockerfile # For deployment
- Data Ingestion: Historical stock data is downloaded from Yahoo Finance using
yfinance. - Feature Engineering: Technical indicators (RSI, MACD, etc.) are calculated to create features for the LSTM model.
- Model Training: The LSTM model is trained on the historical data to predict future prices. The FinBERT model is used for sentiment analysis on news headlines.
- API & Dashboard: The trained models are served via a FastAPI backend and visualized in a Streamlit dashboard.
This project is for educational purposes only and is not financial advice. Do not use it for making real investment decisions.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.