UditGupta10/GPT-InvestAR
소개
Enhancing Stock Investment Strategies through Annual Report Analysis with Large Language Models
AI 및 머신러닝측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalGPT-InvestAR
Enhancing Stock Investment Strategies through Annual Report Analysis with Large Language Models
Updates
- The system prompt used for analysis in the paper has been updated in
config.json. - All questions used to generate features have been updated in
questions.json.
This repository contains a set of tools and scripts designed to enhance stock investment strategies through the analysis of annual reports using Large Language Models. The components in this repository are organized as follows:
download_10k.py: This Python script downloads 10-K filings of companies from the SEC website, which contain crucial financial information.
convert_html_to_pdf.py: Converts HTML files to PDF files. PDFs are preferred due to their token efficiency for further analysis.
make_targets.py: Generates a DataFrame of stock tickers with target values of different time resolutions, which can be used as investment targets for a Machine Learning model.
embeddings_save.py: Generates embeddings of PDF files and saves them using Cromadb. These embeddings are numerical representations of the textual content in annual reports.
gpt_scores_as_features.py: Utilizes saved embeddings to query all questions for each annual report using a Large Language Model (LLM) such as GPT-3.5, and uses the scores or answers as features.
modeling_and_return_estimation.ipynb: This Jupyter Notebook contains the core modeling process. It uses machine learning techniques, specifically Linear Regression, to model the dataset and estimate returns. The goal is to create a portfolio of top-k predicted stocks and compare their returns with the S&P 500 index.
By following the sequence of these components, you can analyze annual reports, generate embeddings, and build predictive models to potentially enhance stock investment strategies.
Feel free to explore each component for more details and usage instructions.
Dependencies
LLama Index (and related dependencies)
OpenBB (and related dependencies)
PDFKit (and related dependencies)
It is recommended to install libraries 1 and 2 in separate virtual (conda) environments. The python scripts mentioned above do not require both these libraries to be installed in the same environment.
Citation
If you use the code or find this repository helpful, please consider citing the paper:
GPT-InvestAR: Enhancing Stock Investment Strategies through Annual Report Analysis with Large Language Models
Udit Gupta
Publication Links:
@article{GPT-InvestAR,
author = {Udit Gupta},
title = {GPT-InvestAR: Enhancing Stock Investment Strategies through Annual Report Analysis with Large Language Models},
journal = {arXiv e-prints},
year = {2023},
eprint = {arXiv:2309.03079},
url = {https://arxiv.org/abs/2309.03079},
}
관련 프로젝트 살펴보기
불러오는 중…