This repository contains the code for "Learning to Generate Explainable Stock Predictions using Self-Reflective Large Language Models" [Paper].
To get started:
- Install the module dependencies into your environment:
pip install -r requirements.txt
- Set
OPENAI_API_KEY
environment variable to your OpenAI API key:
export OPENAI_API_KEY=<your key>
- Run a sample experiment:
python main.py --price_dir "data/sample_price/preprocessed/" --tweet_dir "data/sample_tweet/raw/"
The full dataset used in the work can be found here.
Due to the nature of these experiments, it may not be feasible for individual developers to rerun the full results as OpenAI has significant API charges.
If you find this repository useful, please cite our paper.
@inproceedings{koa2024learning,
title={Learning to Generate Explainable Stock Predictions using Self-Reflective Large Language Models},
author={Koa, Kelvin J.L. and Ma, Yunshan and Ng, Ritchie and Chua, Tat-Seng},
booktitle={Proceedings of the ACM on Web Conference 2024},
pages={4304–4315},
year={2024}
}
We appreciate the following GitHub repositories a lot for their valuable code base: