# Fund Sector AI Scorer

> Use when analyzing Chinese fund, ETF, index, Tushare, Eastmoney, Tiantian Fund, holdings, or financial-news data to produce 77-sector scores and evidence-linked holding observations. Trigger for 板块购买建议评分, 建议评分分布饼图, 当前持仓分析, 加仓减仓观察, 标签评分, 近一周资讯AI分析, sector scoring, total-100 allocation, or up/down magnitude pie charts.

- Skill: `magician-jackson/fund-sector-ai-scorer` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add magician-jackson/fund-sector-ai-scorer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/magician-jackson/fund-sector-ai-scorer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: magician-jackson (https://skillmd.com/u/magician-jackson)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/magician-jackson/fund-sector-ai-scorer

---


# Fund Sector AI Scorer

## Overview

Use this skill to turn recent Chinese market news plus fund/index行情 into a disciplined 77-tag sector analysis. The main output is a non-personalized purchase-observation allocation where all sector scores sum to exactly 100 points.

This skill borrows three operating principles:

- From Tushare workflows: verify data source, token/base URL, date range, and missing-field fallbacks before analysis.
- From Eastmoney fund monitoring: separate evidence, conclusions, and risk notes; avoid individualized buy orders.
- From quantitative research: treat news as one factor, confirm with market/fund behavior, and penalize crowding, stale data, and one-source hype.

## Core Workflow

1. **Validate inputs**  
   Record each source, endpoint, fetch time, row count, date range, and failure. Do not silently mix stale data with fresh data. If Tushare/Eastmoney/Tiantian data is unavailable, label the fallback explicitly.

2. **Normalize evidence**  
   Convert every item into compact records: `source`, `datetime`, `title/content`, `matchedTags`, `sentimentHint`, `riskHint`, `recencyWeight`, and optional market fields such as `pct_chg`, `amount`, `fund_name`, `index_code`.

3. **Tag against the fixed taxonomy**  
   Use the 77-sector taxonomy in `references/scoring-rubric.md`. A single fund or news item may map to multiple tags when holdings, index theme, fund name, or keywords support it. Prefer specific tags such as `PCB`, `CPO`, `半导体材料设备`, `港创新药` over broad parents such as `大科技` or `消费` when both match.

4. **Compress before AI analysis**  
   Feed the AI summarized evidence, not a raw dump. Include per-tag aggregates: news count, high-quality source count, catalyst examples, risk examples, latest timestamps, matched fund count, average涨跌幅, positive/negative幅度贡献, and representative headlines.

5. **Ask AI for a constrained result**  
   Require JSON with all 77 tags represented in `scores`, total score exactly 100, and concise reasoning for the leading tags. The score is a relative purchase-observation weight, not a probability of profit and not personal investment advice.

6. **Validate and normalize**  
   Check that every sector id is known, scores are numeric and non-negative, total equals 100 after rounding, and risk-heavy tags are not promoted without a risk note. If AI output fails validation, repair by normalizing valid scores or use a local factor fallback.

7. **Present clearly**  
   Show the top allocation tags, risk/watch labels, source coverage, and evidence snippets. For the recommendation-score pie, show only the 15 leading positive tags and never add an `其他` slice. For daily market pies, up/down pies must be based on relative涨跌幅幅度 contribution, not fund counts.

## AI Prompt Contract

When calling an LLM, include this contract or equivalent:

```json
{
  "task": "Analyze recent Chinese fund/news/index evidence and allocate exactly 100 points across the fixed 77 sector tags.",
  "rules": [
    "Scores are non-personalized purchase-observation weights.",
    "Use news catalysts, source diversity, recency, fund/index confirmation, and risk penalties.",
    "Do not score by news count alone.",
    "Prefer specific tags over broad parent tags when evidence supports both.",
    "Return every tag with a numeric score; all scores must sum to 100."
  ],
  "output": {
    "scores": {"sector_id": 0},
    "actions": {"sector_id": "积极关注|分批关注|中性观察|暂缓"},
    "notes": {"top_sector_id": "short evidence and risk note for leading sectors"}
  }
}
```

## Scoring Guardrails

- Concentrate only when evidence quality supports it. Weak or generic evidence can receive `0` to `0.5` points.
- For this dashboard, prefer exactly 15 leading tags with positive scores and set weak-evidence tags to 0; avoid spreading 1-3 points across most of the taxonomy.
- A hot tag with clear crowding, policy risk, sharp reversal, or single-source hype should be capped or downgraded.
- Defensive and bond/cash tags may score highly when risk-off evidence dominates, even if news heat is low.
- Do not present the result as guaranteed returns, personalized financial advice, or a command to buy.
- Always state the evidence window, usually "近一周资讯" plus "今日行情".

## Market Pie Rule

For 今日标签行情:

- Prefer Eastmoney's batch valuation ranking endpoint `FundGuZhi/GetFundGZList` for the full-market snapshot. One batch snapshot should be cached and reused by sector aggregation and holding views.
- Do not scan the full fund catalog through one `fundgz` request per fund by default. Keep per-fund `fundgz` requests only as a fallback for codes missing from the batch snapshot.
- Record the valuation source, request count, returned row count, valuation date, update date, cache age, and fallback reason.
- 涨幅饼图 = each tag's positive magnitude contribution divided by total positive magnitude.
- 跌幅饼图 = absolute value of each tag's negative magnitude contribution divided by total negative magnitude.
- Fund count may be displayed as context, but it must not determine pie area.

## Recommendation Score Pie Rule

For 建议评分分布:

- Keep the underlying 77-tag allocation normalized to exactly 100 points.
- Select at most the 15 highest positive scores, sorted descending, for the visible pie and legend.
- Do not create, return, or display an `其他` slice for the unshown remainder.
- Normalize pie angles over the selected scores so the visible slices fill the circle; keep legend values as the original allocation scores, not the normalized angle percentages.
- Filter legacy cached `其他` items in the renderer so old analysis files cannot restore the oversized slice.

## Current Holding Analysis

When the user provides current fund holdings, map every fund to one or more of the fixed 77 tags using the fund code/name, catalog type, index theme, and holdings composition when available. Then inherit the matched tags' news evidence, AI allocation scores, risk heat, and same-day market confirmation.

For each holding output:

- `code`, `name`, `matchedTags`, and current estimated change;
- `supportScore` derived primarily from the strongest matched sector scores;
- `risk`, representative headlines, and same-day tag average;
- one observation label: `考虑加仓`, `继续持有`, `考虑减仓`, or `考虑清仓`;
- a short evidence-linked reason and confidence level.

Use these guardrails:

- `考虑加仓` requires strong sector support, acceptable risk, and no material same-day contradiction.
- `继续持有` is the default when evidence is mixed, moderate, or incomplete.
- `考虑减仓` requires weak support, elevated risk, or a material negative market confirmation.
- `考虑清仓` requires multiple simultaneous negatives: near-zero support, high risk, and a sharp adverse move. Never trigger it from one headline or one weak tag match.
- Do not infer personal suitability. State that the output excludes the user's horizon, liquidity needs, total asset allocation, and risk tolerance.
- These labels are research observations, not automatic orders or guaranteed individualized advice.

## Detailed Rubric

Read `references/scoring-rubric.md` when implementing the scoring logic, prompt, local fallback, or UI explanation.

