| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
An LLM-powered automated quarterly earnings review tool for Chinese A-share companies. Enter a company name or stock code with a reporting period, and it collects financial data and generates a professional research report.
git clone https://github.com/DreamWalkerXZ/a-share-analyst.git
cd a-share-analyst
uv synccp .env.example .envEdit .env and set the required API keys:
| Variable | Description |
|---|---|
| OPENAI_API_KEY | LLM API key (required) |
| SERPER_API_KEY | Serper search API key (required) |
| OPENAI_BASE_URL | API endpoint, defaults to https://api.openai.com/v1 |
| OPENAI_MODEL | Model name, defaults to gpt-4o |
Optional LangSmith tracing variables are documented in .env.example.
# Use a company name
uv run main.py "贵州茅台 2025 Q4"
# Use a stock code
uv run main.py "600519 2025 Q4"Reports are written to the output/ directory. Example:
output/贵州茅台_2025Q4_20260426_231909.md
uv run main.py "<company name or stock code> <year> <quarter>"Supported quarters: Q1, Q2, Q3, Q4.
Force fresh data collection and skip the local cache:
DISABLE_DATA_CACHE=1 uv run main.py "贵州茅台 2025 Q4"graph LR;
data_collection[data_collection<br>Phase 1: 12 AKShare pre-fetch<br>Phase 2: ReAct loop]
report_generation[report_generation<br>Sections 1-4 then Section 0<br>LLM validate + retry]
output[output<br>Assemble Markdown + refs]
data_collection --> report_generation --> output
Data collection is orchestrated with LangGraph. In Phase 2, the LLM schedules calls across three tools:
| Tool | Purpose |
|---|---|
| StructuredDataTool | Calls AKShare financial data interfaces |
| RealTimeSearchTool | Searches industry news and analyst views through Serper |
| FinancialCalculatorTool | Runs sandboxed financial calculations with simpleeval |
uv run pytestsrc/
├── agent/ # LangGraph workflow: graph, nodes, subgraph, state
├── prompts/ # LLM prompts for data collection and report sections
├── tools/ # Tool wrappers for AKShare, Serper search, and calculator
└── utils/ # Utilities for LLM factory, cache, and data formatting
| Back | FazBrowse Home | New Git URL |