Skip to content

QuantGPT: Enhancing Retrieval-Augmented Generation in Finance using Large Language Models

Notifications You must be signed in to change notification settings

LLMQuant/QuantGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

image

QuantGPT: Enhancing Retrieval-Augmented Generation in Finance using Large Language Models

Downloads Downloads Python 3.8 PyPI License

QuantGPT

QuantGPT leverages the power of Large Language Models (LLMs) to enhance Retrieval-Augmented Generation (RAG) in finance. By providing more accurate and contextually relevant information, QuantGPT efficiently retrieves and synthesizes financial data from diverse sources to generate insightful analyses, forecasts, and recommendations.

Table of Contents

QuantGPT Overview

QuantGPT is designed to utilize LLMs to improve the accuracy and contextual relevance of financial information retrieval and generation. In RAG systems, QuantGPT retrieves and synthesizes financial data from various sources, including market reports, financial news, and historical data, to generate comprehensive analyses, forecasts, and actionable recommendations.

Components

Data Retrieval

QuantGPT efficiently retrieves relevant financial data from multiple sources, ensuring that the information is accurate and up-to-date.

Data Synthesis

Using advanced language understanding, QuantGPT synthesizes the retrieved data to create coherent and contextually relevant summaries and reports.

Analysis and Forecasting

QuantGPT leverages the synthesized data to perform in-depth analyses and generate forecasts, providing valuable insights into market trends and financial performance.

Recommendations

Based on the analyses and forecasts, QuantGPT generates actionable recommendations for investment strategies and financial planning.

Installation

1. (Recommended) Create a new virtual environment

conda create --name quantgpt python=3.10
conda activate quantgpt

2. Download the QuantGPT repository

git clone https://github.com/YourUsername/QuantGPT.git
cd QuantGPT

3. Install QuantGPT & dependencies from source or PyPI

pip install -U quantgpt

or

pip install -e .

4. Configure API keys

1. Rename `OAI_CONFIG_LIST_sample` to `OAI_CONFIG_LIST` and add your OpenAI API key.
2. Rename `config_api_keys_sample` to `config_api_keys` and add your financial data API keys.

Usage

Data Retrieval Usage

To retrieve financial data:

from quantgpt.data_retrieval import DataRetriever

retriever = DataRetriever(config)
data = retriever.retrieve()

Data Synthesis Usage

To synthesize retrieved data:

from quantgpt.data_synthesis import DataSynthesizer

synthesizer = DataSynthesizer(config)
summary = synthesizer.synthesize(data)

Analysis and Forecasting Usage

To perform analysis and generate forecasts:

from quantgpt.analysis import Analyzer

analyzer = Analyzer(config)
forecast = analyzer.forecast(data)

Recommendations Usage

To generate investment recommendations:

from quantgpt.recommendations import Recommender

recommender = Recommender(config)
recommendations = recommender.recommend(forecast)

File Structure

The main folder quantgpt has three subfolders data_retrieval, data_synthesis, analysis.

QuantGPT
├── quantgpt (main folder)
│   ├── data_retrieval
│   	├── data_retriever.py
│   ├── data_synthesis
│   	├── data_synthesizer.py
│   ├── analysis
│   	├── analyzer.py
│   ├── recommendations
│   	├── recommender.py
│   ├── utils.py
│
├── configs
├── experiments
├── tutorials (hands-on tutorial)
│   ├── data_retrieval_tutorial.ipynb
│   ├── data_synthesis_tutorial.ipynb 
│   └── analysis_tutorial.ipynb
├── setup.py
├── config_api_keys_sample
├── requirements.txt
└── README.md

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for more details.


Disclaimer: The information provided in this repository is for educational purposes only and should not be construed as financial advice. Always consult with a qualified financial advisor before making any investment decisions.

About

QuantGPT: Enhancing Retrieval-Augmented Generation in Finance using Large Language Models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published