How dvampire/finagent works
• Data Downloaders – From both the “configs/downloader” and “finagent/downloader” directories, these modules handle fetching news, day prices, and economic data. Indicate that these modules retrieve and store raw data.
• Data Processing Layer – Components like “finagent/processor” and tools in the “tools” directory are responsible for cleaning and converting the raw data into structured formats. Also include “tools/data_process.py” as the entry point.
• Data and Asset Management – The “finagent/asset” and “finagent/data” modules manage asset lists and dataset definitions.
• Memory & Storage – The “finagent/memory” module (including FAISS) is used for retaining historical data and context – crucial for machine learning models and decision making.
• Decision & Strategy Modules – The “finagent/prompt” (with its trading submodules), “finagent/provider” and “finagent/tools/strategy_agents” encapsulate logic for generating trading decisions. Also include “finagent/trajectory” which implements dynamic programming – part of strategy optimization.
• Visualization & Metrics – “finagent/plots” and “finagent/metrics” cater to result visualizations (like Kline charts) and tracking performance metrics.
• Configuration and Experimentation – The “configs” folder (with its asset lists, trading strategies experiments in “configs/exp”, and processor configs) and “res/strategy_record” illustrate the experimental record and customized configuration aspects.
Interactions and Data Flow
• That once data is fetched, it is passed to the Data Processing layer, which cleans and structures the data.
• Visualization side: once decisions are made, performance metrics (via “finagent/metrics” and “finagent/plots”) are generated and optionally stored or displayed.
• Experimental branch where configurations (from “configs/exp”) and recorded strategy results (in “res/strategy_record”) are used for training and refining strategies.
Architectural Patterns and Technologies
• The system uses a modular, layered architecture. Each component (Downloader, Processor, Memory, Decision-making) is roughly isolated, communicating via well-defined interfaces.
• The separation of concerns is evident – configurations, data acquisition, processing, memory management, decision prompting, and visualization are split into distinct modules.
• Technologies include Python 3.10, FAISS (for memory), Playwright (for web automation), and various API clients for data retrieval.
• The extensive use of prompts and template files (in “res/prompts”) suggests that the system leverages language model interactions and dynamic decision frameworks.