LLM based Finance Agent is a powerful tool that leverages large language models (LLMs) to automatically fetch news and predict historical stock prices to forecast future prices. This repository is designed to provide financial insights using state-of-the-art natural language processing (NLP) and machine learning techniques.
- Clone the repository:
git clone https://github.com/Shengwei-Peng/LLM-based-Finance-Agent.git
- Navigate to the project directory:
cd LLM-based-Finance-Agent
- Install the required dependencies:
pip install -r requirements.txt
Configure the agent by editing the config.json
file with your API keys and desired settings:
{
"news_api_key": "your_news_api_key",
"genai_api_key": "your_genai_api_key",
"model_name": "gemini-1.5-pro",
"stock_symbol": "2330.tw",
"days": 30
}
news_api_key
: Your API key for the news data provider (Apply here).genai_api_key
: Your API key for Google Generative AI (Apply here).model_name
: The name of the Google Generative AI model to be used.stock_symbol
: The stock symbol to analyze.days
: The number of days to consider for the analysis.
-
Ensure that you have configured the config.json file as described in the Configuration section.
-
Run the project using the following command:
python main.py
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or inquiries, please contact [email protected]