Skip to content

koa-fin/sep

Repository files navigation

Summarize-Explain-Predict (SEP)

This repository contains the code for "Learning to Generate Explainable Stock Predictions using Self-Reflective Large Language Models" [Paper].

Setup

To get started:

  1. Install the module dependencies into your environment:
pip install -r requirements.txt
  1. Set OPENAI_API_KEY environment variable to your OpenAI API key:
export OPENAI_API_KEY=<your key>
  1. Run a sample experiment:
python main.py --price_dir "data/sample_price/preprocessed/" --tweet_dir "data/sample_tweet/raw/"

Note

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.

Citation

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 JL and Ma, Yunshan and Ng, Ritchie and Chua, Tat-Seng},
  booktitle={Proceedings of the ACM Web Conference 2024},
  year={2024}
}

Acknowledgement

We appreciate the following GitHub repositories a lot for their valuable code base:

https://github.com/noahshinn/reflexion

https://github.com/jackaduma/Vicuna-LoRA-RLHF-PyTorch

About

Code release for "Learning to Generate Explainable Stock Predictions using Self-Reflective Large Language Models" https://arxiv.org/abs/2402.03659

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages