FinAI Research Workflow
About
End-to-end empirical research pipeline with 43 MCP data sources, 47 econometric methods, 30 journal templates (JF/JFE/RFS, 经济研究/金融研究/管理世界)
Details
- Author
- csmar432
- Categories
- Finance
Jump to
Setup
Install FinAI Research Workflow in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/csmar432/finai-research
Follow the installation instructions in the repository README, then restart your MCP client.
研究主题一句话 → 收到可核验的 LaTeX 草稿。Describe your research topic → receive a verifiable LaTeX draft.
# ── 推荐方式:PyPI wheel 安装(首次约 60s)──────────────────────────── # Debian/Ubuntu:先创建虚拟环境,避免与系统 Python 冲突 python3 -m venv .venv && source .venv/bin/activate pip install "finai-research-workflow[extras]" # 配置 LLM(DeepSeek 直连,免费) export DEEPSEEK_API_KEY=sk-xxxx # 启动流水线(wheel 安装后的写作入口;加 --use-hitl 启用阶段门控) finai-pipeline --topic "Carbon trading and green innovation" --use-hitl # 或 python -m finai.pipeline --topic "碳排放权交易与企业绿色创新" --use-hitl # ── 源码安装(推荐贡献者 / 想改代码的用户)──────────────────────────── git clone https://github.com/csmar432/finai-research.git && cd finai-research pip install -e ".[extras]" cp .env.example .env.local # 编辑 .env.local:DEEPSEEK_API_KEY=sk-... # 新用户:先澄清(不自动开跑)→ 再写作;或澄清时加 --continue python scripts/start_research.py --topic "Carbon trading and green innovation" python scripts/agent_pipeline.py --topic "Carbon trading and green innovation" --use-hitl # ── Debian/Ubuntu apt 系统 Python ───────────────────────────────────── # apt 的 Python 被系统管理,直接 pip install 会触发 PEP 668 冲突。 # 解法:使用虚拟环境(见上方),或加 --break-system-packages pip install --break-system-packages "finai-research-workflow[extras]"
重要提示:缺少DEEPSEEK_API_KEY时,finai-pipeline默认以退出码 4 退出(严格模式),并打印明确指引。可以用finai-doctor诊断配置来源。
PyPI:finai-research-workflow · 0.2.0a1· MIT · 默认安装pip install finai-research-workflow不含 fastapi/streamlit(避免 PyJWT/apt 冲突) · Web 套件:pip install 'finai-research-workflow[web]'DOI:10.5281/zenodo.21262689
This guided interface walkthrough shows the supported agent hosts, research-brief checkpoint, separate writing and empirical tracks, fail-closed data routing, and verifiable delivery package. It is intentionallynotpresented as a live research run and contains no mock coefficients, citations, or statistical claims. Regenerate it deterministically withpython scripts/demo/gen_quick_demo.py; see.github/demo/README.mdfor the visual contract.
一次输入 → 8 阶段流水线:想法生成 → 文献综述 → 新颖性验证 → 实证设计 → 数据获取 → 分析 → 论文写作 → 对抗性 Review。每阶段需研究者确认。
⚠️ AI 生成的因果识别策略、统计结果和引用必须由研究者独立核实后方可投稿。 ⚠️ Mock / synthetic data 默认禁用,只有用户明确授权后才能启用,且输出必须带有 ⚠️ MOCK DATA 标识。
完整文档:使用指南.md·CLAUDE.md· 运行python scripts/setup_wizard.py --guided
- Built for economists, not generic AI demos— every default is calibrated for theJournal of Finance/经济研究standard (DID with heterogeneous treatment effects, cluster-robust SEs at the firm level, 19 robustness checks, parallel-trend plots).
- 43 MCP server directories— covers A-share financials, US equities, global macro (FRED/World Bank/IMF/OECD/BEA), and 400M+ academic papers (OpenAlex). The registry contains28 no-key, 12 API-key, 0 stub, and 3 opt-in legal-risk directories; classification is maintained byscripts/count_assets.py.
- 58 econometric method modules, not just OLS— standard DID, event study, Bacon decomposition, heterogeneous-treatment diagnostics, synthetic control, instrumental variables (optionallinearmodels), panel GMM, RDD, mediation, and more. Methods that require an external backend fail visibly when it is unavailable; see CLAUDE.md for dependency notes.
- 30 journal templates, English/Chinese/Japanese/German— JF, JFE, RFS, JAE, Econometrica, 经济研究, 金融研究, 管理世界, 会计研究, 中国工业经济.
- 18 specialised AI skills(Claude Code / Cursor / GitHub Copilot) — idea discovery, literature review, novelty check, experiment design, data acquisition, paper drafting, figure generation, LaTeX compilation, review loops.
- Human-in-the-loop, never autonomous fabrication— every stage requires explicit checkpoint approval; data sources are verified before use; no synthetic data without user consent.
FinAI is purpose-built for economic & financial research. Here is what it does that general LLMs cannot:
[!TIP] Start now with zero setup:Open in GitHub Codespaces. No local install required.
For Chinese users:The most comprehensive guide is使用指南.md— a complete 13-chapter manual covering installation, workflows, data sources, econometric methods, paper writing, and FAQ.
Not sure?If you've ever spent days downloading data, running regressions, formatting LaTeX tables, or searching for related work — this tool is for you.
register_mcp_servers.pysupports 4 user-type profiles — pick the one matching your hardware and use case:
# 1) Dry-run first (推荐先看) python scripts/register_mcp_servers.py --profile academic --prune --dry-run # 2) Actually apply python scripts/register_mcp_servers.py --profile academic --prune # 3) List current registration python scripts/register_mcp_servers.py --list
Seeconfig/mcp_profiles.jsonfor full server lists and the[使用指南.mdchapter on installation for step-by-step.
Default behavior: without--profile, all 43 MCP servers are registered (matchesfullprofile). Use--pruneto remove out-of-profile servers.
The project supportsmacOS,Linux, andWindowswith platform-specific entry points:
This project supports two entry points — pick the one that matches your workflow:
The AI agent handles the full pipeline end-to-end. No need to remember commands.
# 1) Install once ./run.sh # macOS / Linux run.bat # Windows # 2) Health check python scripts/health_check.py # 3) Start an AI Agent (Claude Code / Cursor / Codex) and describe your research: # "帮我研究关税政策对A股出口型企业创新的影响,设计一篇发表在经济研究的实证论文"
The AI agent automatically calls all 8 pipeline stages, MCP data sources, and LaTeX generators. Each stage requires your checkpoint approval before proceeding.
Run individual scripts directly for fine-grained control:
# Writing track python scripts/agent_pipeline.py --topic "Carbon trading and green innovation" --use-hitl # Empirical track (production modern DID) python -m scripts.research_framework.enhanced_pipeline --topic "Carbon trading and green innovation" # Empirical demo TWFE smoke only python scripts/research_framework/pipeline.py --mode full --topic "Carbon trading and green innovation" # Demo: institutional-grade financial report python scripts/demo_research_report.py --stock 000001.SZ # MCP tool discovery python scripts/core/mcp_tool_market.py --search "gdp" --report # Journal template generation python scripts/journal_template.py --list python scripts/journal_template.py --generate JFE output/paper.tex
- macOS: Keychain is native; keyring usesKeychainBackendautomatically
- Linux: Keyring uses SecretService (gnome-keyring). For Chinese fonts, installfonts-noto-cjk:
sudo apt install fonts-noto-cjk fonts-wqy-zenhei
- ✅ Allscripts/*.pyentry points
- ✅ 43 MCP servers (pure Python stdlib)
- ✅ Checkpoint (fcntl.flockfalls back to no-op on Windows)
- ✅ Unit tests (pytest --collect-only; CI matrix: Ubuntu + macOS + Windows; daemon mode uses polling loop on Windows)
…
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
