← Back to Skills Marketplace
tempest-01

Fund Ai Assistant

by tempest01 · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ Security Clean
118
Downloads
1
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install fund-ai-assistant
Description
Fund portfolio tracker with AI analysis, multi-agent debate, technical indicators (VaR/Sortino/Calmar), macro monitoring, and rebalancing alerts.
README (SKILL.md)

Fund AI Assistant

Version: 3.0 | License: MIT-0 | LLM: Any OpenAI-compatible provider


Overview

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.


1. Features

Feature Description
📊 Technical Analysis MACD / KDJ / RSI / Bollinger Bands / MA + VaR / Sortino / Calmar
🤖 AI Quantitative Analysis Any LLM (OpenAI-compatible), outputs buy/sell/hold with price targets
⚖️ Multi-Agent Debate 6 roles → game-theory judge verdict
📋 Portfolio Rebalancing Detects allocation drift, outputs precise rebalancing instructions
🎯 Entry Timing RSI + Bollinger + trend composite score
🌡️ Correlation Heatmap Pairwise correlation matrix for diversification
🌍 Macro Event Monitor CSI300 / USD-CNY / FOMC / LPR alerts

2. Environment Variables

Required

Variable Description
LLM_MODEL Model name, e.g. gpt-4o-mini
LLM_API_KEY Your LLM API key

Optional

Variable Description
LLM_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_KEY Tavily API for real-time macro search
FUND_SCENE_DIR Directory with optional .md scene templates (default: ./scenes/)
PUSH_WEBHOOK_URL Generic HTTP POST webhook (WeCom / Feishu / Slack)
BARK_PUSH_URL iOS Bark notification URL
PUSH_EMAIL Target email for SMTP push
SMTP_HOST/PORT/USER/PASS SMTP configuration (used with PUSH_EMAIL)
QQ_WEBHOOK_URL QQ bot HTTP interface (go-cqhttp / Lagrange)

Setup Example

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"

3. Installation

# 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

4. Script Reference

Script Function Usage
analyzer.py Main entry, tracking + analysis python3 analyzer.py list
ai_analysis.py AI quantitative analysis python3 ai_analysis.py
debate_analyzer.py Multi-agent debate python3 debate_analyzer.py \x3Ccode>
rebalance.py Portfolio drift detection python3 rebalance.py
recommend.py Entry timing suggestions python3 recommend.py
event_monitor.py Macro event monitor python3 event_monitor.py
correlation_v2.py Correlation heatmap python3 correlation_v2.py
fund_api.py East Money data API python3 fund_api.py
technical.py Technical indicators python3 technical.py
chart_generator.py PIL chart generation python3 chart_generator.py
positions.py Position record management python3 positions.py
macro_fetcher.py Macro data fetcher python3 macro_fetcher.py
strip_color.py ANSI strip for cron cmd | python3 strip_color.py
llm.py Unified LLM interface from llm import get_llm_config, call_llm

5. Scheduled Tasks (Reference)

# 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

6. File Structure

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)

7. Security Notes

Read carefully before installing and running.

Required Credentials

  • LLM_MODEL and LLM_API_KEY are required. Use a dedicated API key, not a high-value production key.
  • Before first run, inspect llm.py and fund_api.py to confirm no credential exfiltration.

Filesystem Access

  • FUND_SCENE_DIR: The skill reads .md template files from the directory you specify.
    • Do NOT point it at system directories, home directories, or folders containing secrets.
    • If unset, defaults to {skill_dir}/scenes/ (which is created empty).
    • Only .md files in that directory are read.

Network Access

  • East Money APIs: fundgz.1234567.com.cn, api.fund.eastmoney.com — public fund data.
  • Tavily (if TAVILY_API_KEY set): Real-time macro search.
  • Push endpoints (if configured): Analysis summaries are sent to the URLs you provide.

Push Channels

If any of these are set, analysis output will be transmitted externally:

Variable Transmission
PUSH_WEBHOOK_URL HTTP POST to your webhook URL
BARK_PUSH_URL GET request to your Bark URL
PUSH_EMAIL SMTP email to your address
QQ_WEBHOOK_URL HTTP POST to your QQ bot

Use endpoints you control. Do not set these with untrusted third-party URLs.

Data Privacy

  • All fund data is fetched from East Money on demand; no persistent storage of market data.
  • Position records (positions.json) are stored locally in the skill directory only.
  • LLM API key is sent only to the configured LLM_API_BASE endpoint.
  • No telemetry, no external analytics, no data sent to third parties without explicit configuration.

Recommended Precautions

  1. Use a dedicated LLM API key — not your main production key.
  2. ⚠️ Inspect 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.
  3. Review llm.py and fund_api.py before first run.
  4. Run in an isolated environment (container or VM) on first use.
  5. Do not set FUND_SCENE_DIR to sensitive directories.
  6. Do not share your LLM_API_KEY or push endpoint URLs.

8. Inspiration & Attribution

  • astrbot_plugin_fund_analyzer — Multi-agent debate framework inspiration; adapted from stock to fund analysis with added portfolio management features.
  • OpenClaw — Scheduling and notification infrastructure.
  • East Money (东方财富) — Fund price and history data source.
  • Tencent Finance (腾讯财经) — CSI300 real-time data source.

This skill was developed with AI assistance.

Usage Guidance
This package appears to do what it says (local fund analysis + AI). Before installing or running: 1) Review llm.py to confirm which endpoint the code calls and that it does not leak your key to unknown servers; if you must set LLM_API_BASE, point it only at trusted endpoints. 2) Use a dedicated, low-privilege API key with quota limits for LLM_API_KEY. 3) Inspect fund_api.py and macro_fetcher.py to confirm data sources—East Money is expected; look for any unexpected outbound endpoints. 4) Do not configure PUSH_WEBHOOK_URL, SMTP_*, BARK_PUSH_URL, or QQ_WEBHOOK_URL to untrusted endpoints (those will transmit analysis output). 5) FUND_SCENE_DIR should point to a directory you control and must not be set to system or credential directories. 6) Note minor metadata mismatches (several version strings and clone instructions) — the shipped bundle already contains the code, so cloning again is optional; verify the source repository URL before cloning. If you cannot or will not audit llm.py and other network code, avoid supplying high-value API keys or external push endpoints.
Capability Analysis
Type: OpenClaw Skill Name: fund-ai-assistant Version: 1.0.2 The fund-ai-assistant skill is a comprehensive investment tool for tracking and analyzing mutual funds using technical indicators and LLM-based quantitative analysis. It fetches market data from legitimate public sources such as East Money (fundgz.1234567.com.cn) and Tencent Finance, and macro data via the Tavily API. The bundle includes features for portfolio rebalancing, multi-agent financial debates (debate_analyzer.py), and automated alerts (event_monitor.py) via user-configured webhooks or SMTP. No evidence of malicious intent, credential exfiltration, or unauthorized execution was found; the code is well-structured, and the documentation in SKILL.md proactively includes security considerations for API key management.
Capability Assessment
Purpose & Capability
Name/description (fund portfolio analysis, technical indicators, multi-agent debate, macro monitoring) match the included scripts (analyzer.py, technical.py, ai_analysis.py, debate_analyzer.py, fund_api.py, macro_fetcher.py, etc.). Required credentials (LLM model & API key) are appropriate for the AI analysis capability. Optional push/webhook/SMTP/Tavily settings are coherent with notification and macro-search features.
Instruction Scope
Runtime instructions are explicit: clone repo, set LLM_MODEL/LLM_API_KEY, run analyzer/event_monitor, and optionally schedule tasks. The skill reads local config/positions files and an optional FUND_SCENE_DIR for .md templates; it will send analysis to configured webhooks/SMTP if you set them. SKILL.md includes sensible warnings to inspect llm.py and fund_api.py before first run. Be aware that scheduled/crontab tasks will run the same scripts and therefore will perform network calls (East Money, LLM endpoint, optional Tavily and user-configured push endpoints).
Install Mechanism
There is no automated install spec in the registry (the SKILL.md shows manual git clone and pip install -r requirements.txt). Requirements appear to be standard Python libraries (Pillow, numpy, matplotlib). No unusual or opaque remote downloads, URL shorteners, or archive extraction from unknown hosts were observed in the provided files.
Credentials
Only LLM_MODEL and LLM_API_KEY are required (declared as primary credential). Optional environment variables (LLM_API_BASE, TAVILY_API_KEY, PUSH_WEBHOOK_URL, SMTP_*, BARK_PUSH_URL, QQ_WEBHOOK_URL, FUND_SCENE_DIR) are justified by notification, macro search, and templating features. Important risk: if you set LLM_API_BASE to an untrusted host, your API key and prompts (including fund data) will be sent to that endpoint (SKILL.md and _meta.json explicitly warn about this).
Persistence & Privilege
The skill does not request always:true, does not require system-wide configuration changes, and operates on files within its own directory (config.json, positions.json, assets). It may create/update local config and assets. Scheduled invocation (crontab/OpenClaw) is optional and user-controlled.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install fund-ai-assistant
  3. After installation, invoke the skill by name or use /fund-ai-assistant
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
Fix: replace requests stdlib to remove third-party dependency; add LLM_API_BASE security warning; add primary_credential to registry metadata; add explicit security notes for push endpoints and FUND_SCENE_DIR
v1.0.1
Fix: add explicit env_vars declarations, network/filesystem/notification capability docs, English SKILL.md, security notes addressing FUND_SCENE_DIR and push endpoints
v1.0.0
基金AI助手 v1.0.0 首次发布 - 提供基金多维度智能分析,包括净值查询、技术指标、风险收益分析(VaR/Sortino/Calmar)、宏观事件监控等功能 - 支持多空多角色AI辩论及反向验证,自动生成调仓建议与建仓时机评分 - 实现基金关联性热力图、自动再平衡提醒、持仓管理和多推送渠道通知 - 提供实用脚本工具与详细环境变量说明,支持多种定时任务部署方式 - 数据来源于东方财富,支持宏观实时数据(需Tavily API Key)
Metadata
Slug fund-ai-assistant
Version 1.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Fund Ai Assistant?

Fund portfolio tracker with AI analysis, multi-agent debate, technical indicators (VaR/Sortino/Calmar), macro monitoring, and rebalancing alerts. It is an AI Agent Skill for Claude Code / OpenClaw, with 118 downloads so far.

How do I install Fund Ai Assistant?

Run "/install fund-ai-assistant" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Fund Ai Assistant free?

Yes, Fund Ai Assistant is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Fund Ai Assistant support?

Fund Ai Assistant is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Fund Ai Assistant?

It is built and maintained by tempest01 (@tempest-01); the current version is v1.0.2.

💬 Comments