gxy837 / sep

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


Languages

Language:Python 100.0%