MCPcopy Create free account
hub / github.com/DVampire/FinAgent

github.com/DVampire/FinAgent @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
381 symbols 1,673 edges 142 files ⚖ MIT 63 documented · 17% updated 1y ago★ 753 open issues

Browse by type

Functions 330 Types & classes 51
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

FinAgent

Installation

conda create -n finagent python=3.10
conda activate finagent

#for linux
apt-get update && apt-get install -y libmagic-dev
# for mac
pip install python-magic-bin==0.4.14

conda install -c pytorch faiss-cpu=1.7.4 mkl=2021 blas=1.0=mkl
pip install -r requirements.txt
playwright install
# for linux
playwright install-deps

Prepare the environment variables

The suggested way to do it is to create a .env file in the root of the repository (never push this file to GitHub) where variables can be defined. Please check the examples below. Sample .env file containing private info that should never be on git/GitHub:

OA_OPENAI_KEY = "abc123abc123abc123abc123abc123" # https://platform.openai.com/docs/overview
OA_FMP_KEY = "abc123abc123abc123abc123abc123" # https://site.financialmodelingprep.com/developer/docs
OA_POLYGON_KEY = "abc123abc123abc123abc123abc123" # https://polygon.io/
OA_YAHOOFINANCE_KEY = "abc123abc123abc123abc123abc123" # https://finnhub.io/
HUGGINEFACE_KEY = "abc123abc123abc123abc123abc123" # https://huggingface.co/
RAPIDAPI_KEY = "abc123abc123abc123abc123abc123" # https://rapidapi.com/
ALPHA_VANTAGE_KEY = "abc123abc123abc123abc123abc123" # https://www.alphavantage.co/

Prepare the data


1. Download the data
python tools/download_prices.py
python tools/download_news.py
...

2. Process the data
python tools/data_process.py

Run

python main.py
python main_mi_w_decision.py
...

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 209
Function 121
Class 51

Languages

Python100%

Modules by API surface

finagent/provider/provider.py17 symbols
finagent/tools/strategy_agents.py16 symbols
finagent/processor/processor.py16 symbols
finagent/memory/interface.py13 symbols
finagent/environment/trading.py13 symbols
finagent/downloader/news/fmp_downloader.py12 symbols
finagent/asset/base.py12 symbols
finagent/memory/faiss.py9 symbols
finagent/memory/base.py9 symbols
finagent/prompt/trading/low_level_reflection.py8 symbols
finagent/prompt/helper.py8 symbols
finagent/downloader/tools/fmp_sentiment_downloader.py8 symbols

For agents

$ claude mcp add FinAgent \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page