Version: 3.0 | License: MIT-0 | LLM: Any OpenAI-compatible provider
A local-first fund investment assistant running entirely on your machine. Fetches data from East Money, analyzes with any LLM provider, and supports scheduled tasks via OpenClaw or crontab.
⚠️ Security Notice: This skill requires
LLM_MODEL+LLM_API_KEY. Use a dedicated API key. See Section 7 for all security considerations.
FeatureDescription📊 Technical AnalysisMACD / KDJ / RSI / Bollinger Bands / MA + VaR / Sortino / Calmar🤖 AI Quantitative AnalysisAny LLM (OpenAI-compatible), outputs buy/sell/hold with price targets⚖️ Multi-Agent Debate6 roles → game-theory judge verdict📋 Portfolio RebalancingDetects allocation drift, outputs precise rebalancing instructions🎯 Entry TimingRSI + Bollinger + trend composite score🌡️ Correlation HeatmapPairwise correlation matrix for diversification🌍 Macro Event MonitorCSI300 / USD-CNY / FOMC / LPR alerts
VariableDescriptionLLM_MODELModel name, e.g. gpt-4o-mini``LLM_API_KEYYour LLM API key
VariableDescriptionLLM_API_BASE⚠️ Custom API URL — if untrusted, your key and data go there. Use endpoints you control. Default: https://api.openai.com/v1``TAVILY_API_KEYTavily API for real-time macro searchFUND_SCENE_DIRDirectory with optional .md scene templates (default: ./scenes/)PUSH_WEBHOOK_URLGeneric HTTP POST webhook (WeCom / Feishu / Slack)BARK_PUSH_URLiOS Bark notification URLPUSH_EMAILTarget email for SMTP pushSMTP_HOST/PORT/USER/PASSSMTP configuration (used with PUSH_EMAIL)QQ_WEBHOOK_URLQQ bot HTTP interface (go-cqhttp / Lagrange)
bash
export LLM_MODEL="gpt-4o-mini"
export LLM_API_KEY="sk-xxx"
# Optional
export TAVILY_API_KEY="tvly-xxx"
export PUSH_WEBHOOK_URL="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"
bash
# 1. Clone
git clone https://github.com/tempest-01/fund-ai-assistant.git
cd fund-ai-assistant
# 2. Install optional dependencies (charts)
pip install -r requirements.txt
# 3. Configure
cp config.example.json config.json
cp positions.example.json positions.json
# 4. Set environment variables (see Section 2)
export LLM_MODEL="your_model"
export LLM_API_KEY="your_key"
# 5. Verify
python3 analyzer.py list
python3 analyzer.py analyze
ScriptFunctionUsageanalyzer.pyMain entry, tracking + analysispython3 analyzer.py list``ai_analysis.pyAI quantitative analysispython3 ai_analysis.py``debate_analyzer.pyMulti-agent debatepython3 debate_analyzer.py <code>``rebalance.pyPortfolio drift detectionpython3 rebalance.py``recommend.pyEntry timing suggestionspython3 recommend.py``event_monitor.pyMacro event monitorpython3 event_monitor.py``correlation_v2.pyCorrelation heatmappython3 correlation_v2.py``fund_api.pyEast Money data APIpython3 fund_api.py``technical.pyTechnical indicatorspython3 technical.py``chart_generator.pyPIL chart generationpython3 chart_generator.py``positions.pyPosition record managementpython3 positions.py``macro_fetcher.pyMacro data fetcherpython3 macro_fetcher.py``strip_color.pyANSI strip for croncmd | python3 strip_color.py``llm.pyUnified LLM interfacefrom llm import get_llm_config, call_llm
bash
# OpenClaw users
openclaw cron add --cron "0 8 * * 1-5" \
--message "cd /path/to/fund-ai-assistant && python3 event_monitor.py --dry-run"
openclaw cron add --cron "30 9 * * 1-5" \
--message "cd /path/to/fund-ai-assistant && python3 analyzer.py analyze"
# crontab users
0 8 * * 1-5 cd /path/to/fund-ai-assistant && python3 event_monitor.py >> /var/log/fund.log 2>&1
text
fund-ai-assistant/
├── .gitignore
├── _meta.json # Registry metadata
├── SKILL.md # This file
├── README.md # Full bilingual documentation
├── config.example.json # Tracking list template
├── positions.example.json # Position record template
├── requirements.txt # Optional: Pillow / numpy / matplotlib
├── llm.py # Unified LLM interface
├── analyzer.py # Main entry
├── ai_analysis.py # AI quantitative analysis
├── debate_analyzer.py # Multi-agent debate
├── rebalance.py # Portfolio drift detection
├── recommend.py # Entry timing
├── event_monitor.py # Macro event monitor
├── correlation_v2.py # Correlation heatmap
├── fund_api.py # East Money API
├── technical.py # Technical indicators
├── chart_generator.py # PIL chart generation
├── macro_fetcher.py # Macro data
├── positions.py # Position records
├── strip_color.py # ANSI color strip
└── assets/ # Chart output (auto-created)
Read carefully before installing and running.
LLM_MODEL and LLM_API_KEY are required. Use a dedicated API key, not a high-value production key.llm.py and fund_api.py to confirm no credential exfiltration.FUND_SCENE_DIR: The skill reads .md template files from the directory you specify.
{skill_dir}/scenes/ (which is created empty)..md files in that directory are read.fundgz.1234567.com.cn, api.fund.eastmoney.com — public fund data.TAVILY_API_KEY set): Real-time macro search.If any of these are set, analysis output will be transmitted externally:
VariableTransmissionPUSH_WEBHOOK_URLHTTP POST to your webhook URLBARK_PUSH_URLGET request to your Bark URLPUSH_EMAILSMTP email to your addressQQ_WEBHOOK_URLHTTP POST to your QQ bot
Use endpoints you control. Do not set these with untrusted third-party URLs.
positions.json) are stored locally in the skill directory only.LLM_API_BASE endpoint.LLM_API_BASE — if set to an untrusted endpoint, your API key and fund data will be sent there. Only use https://api.openai.com/v1 or endpoints you control.llm.py and fund_api.py before first run.FUND_SCENE_DIR to sensitive directories.LLM_API_KEY or push endpoint URLs.This skill was developed with AI assistance.