Multi-task fine-tuning of FinBERT to jointly model:
- Financial news sentiment (classification)
- Article importance (classification)
The model uses a shared transformer backbone with task-specific heads and is evaluated using macro and weighted F1 metrics.
pip install -r requirements.txtA virtual environment is recommended. GPU is recommended for training.
Training is implemented in:
ml/notebooks/FinBERT_MultiTask.ipynb
Trained model weights are not included due to GitHub size limitations.
After training, save the model locally and update the model path where necessary.
Financial news data is retrieved using the MarketAux API.
Base endpoint used:
https://api.marketaux.com/v1/news/all
- Inside the
server/directory, create a.envfile:
NEWS_API_TOKEN=your_token_here
NEWS_API_BASE_URL=https://api.marketaux.com/v1/news/all
- From the root directory, run:
python server/main.pyEnsure the trained model path is correctly configured in the server code.
No frontend framework or Node server is used.
To run the frontend:
- Open the HTML file using a Live Server extension (e.g., VS Code Live Server),
or - Open the HTML file directly in your browser.
- Model weights are excluded due to size constraints.
- Adjust local paths before running.
- GPU recommended for training.