License | Language | Libraries |
---|---|---|
The goal of this project is to give you the chance of looking at the dependence between the news sentiment of a company with respect to its share price. This project is one part of a main project still on its way, which aims to provide a financial analysis platform.
News data are taken through Polyglon APIs, using the stocks basic API plan account.
The project structure is based on a server side, which manages the calls to the sentiment analysis model, and a client side, that show a UI. The server provides a service API for the inference of the model and the extraction of news and stock data, while the client is developed as a platform, generated with streamlit, that allows the user to interact with the server side, searching the interested companies to be analyzed.
We developed the sentiment analysis model as a neural network model, based on fine-tuning of an existent pre-trained model. We trained and experimented different models, until we reached the best one. In order to keep our model private, we provide just a pre-trained model as a sentiment analysis model, that is the transformers model taken from hugging face
- Create a new virtual environment
python -m venv ./venv
source venv/bin/activate
pip install --upgrade pip
- Clone the repository and move to the downloaded directory
git clone https://github.com/sicilian-scientists/financial-sentiment-analysis
cd financial-sentiment-analysis
- Request Polyglon's API key (FREE)
- Write the given key in 'files/api_key_polyglon.txt'
echo API_KEY > files/api_key_polyglon.txt
- Install the requirements
pip install requirements.txt
- Run local server and dashboard
python api_server.py
streamlit run main.py
- You're ready to go!
- Fork the repository
- Do the desired changes
- Make a pull request