Agent skill

Market Sentiment Analysis

by HKUDS in HKUDS/Vibe-Trading

Turns market mood into numbers: fear-and-greed gauges, put-call ratio, margin financing, northbound flows and social media chatter, combined into one score.

MITAuto-check passedBusiness, Finance & HR

SKILL.md written in Chinese; this summary is our English description.

Install Market Sentiment Analysis

skills CLI
$ npx skills add HKUDS/Vibe-Trading --skill sentiment-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/Vibe-Trading sentiment-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/sentiment-analysis .claude/skills/sentiment-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sentiment-analysis
GitHub stars
35k
Token cost
~1.1k tokens
SKILL.md length
159 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Turns market mood into numbers: fear-and-greed gauges, put-call ratio, margin financing, northbound flows and social media chatter, combined into one score.

  • Works in 7 steps: 反向指标不是精确择时:情绪可以在极端区域持续很久,不要仅凭情绪做空/做多 → 情绪+趋势结合:上升趋势中的贪婪是正常的,下降趋势中的恐惧也是正常的 → 不同市场不同阈值:A股、美股、加密的情绪阈值差异大 → …
  • Judging whether a market looks overheated or oversold from sentiment data
  • SKILL.md covers 概述, 恐贪指数, Put-Call Ratio and 融资融券信号(A股), plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

A Chinese-language guide that makes market mood measurable. It covers the crypto fear and greed index and an A-share substitute built from turnover, limit-up and limit-down counts, new accounts, margin balance changes and ETF flows, then put-call ratios with reference ranges for US, A-share and Bitcoin options, margin financing and short-selling balances, northbound capital flows and social media sentiment.

Sentiment is treated mainly as a contrarian signal. The guide pairs the put-call ratio with the VIX, notes that passive funds and hedging have reduced what northbound flows reveal since 2023, and defines social metrics such as discussion heat, bullish-post share and newcomer share. It then combines five dimensions into a weighted composite score from 0 to 100 and maps score bands to suggested position sizes. The excerpt is cut off partway through that table.

When your agent uses it

  • Judging whether a market looks overheated or oversold from sentiment data
  • Interpreting the put-call ratio together with the VIX
  • Reading A-share margin financing and northbound capital signals
  • Building a composite sentiment score from several indicators

Example prompts

  • “Is the current Bitcoin fear and greed reading a contrarian buy signal?”
  • “Use margin balance and northbound flow data to tell me whether A-share sentiment is overheated.”
  • “Build a composite sentiment score from fear and greed, put-call ratio and social media heat.”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. 反向指标不是精确择时:情绪可以在极端区域持续很久,不要仅凭情绪做空/做多
  2. 情绪+趋势结合:上升趋势中的贪婪是正常的,下降趋势中的恐惧也是正常的
  3. 不同市场不同阈值:A股、美股、加密的情绪阈值差异大
  4. 数据获取限制:部分情绪数据需要付费API(如Bloomberg情绪指标、Glassnode)
  5. 社交媒体噪音大:机器人/营销号会干扰舆情分析,需要过滤
  6. 北向资金变化:2023年后北向数据披露规则变化,实时数据不如以前透明
  7. 融资数据T+1:融资融券数据为T+1日公布,有滞后

What it can do on your machine

Read from SKILL.md and the folder at commit 14cabaf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Market Sentiment Analysis loads about 1.1k tokens when it runs. Until then it costs about 18 tokens; SKILL.md has 159 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~18
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/Vibe-Trading at commit 14cabaf, republished under its MIT licence (© HKUDS). 159 words, ~1,115 tokens.

Download SKILL.mdSave it as .claude/skills/sentiment-analysis/SKILL.md (or your agent's skills folder).
name
sentiment-analysis
description
市场情绪分析——恐贪指数/Put-Call Ratio/融资融券/北向资金信号解读、社交媒体舆情量化框架
category
analysis

市场情绪分析

概述

量化市场情绪,将主观的"贪婪与恐惧"转化为可衡量的指标。覆盖恐贪指数、期权情绪、杠杆资金、外资流向和社交舆情五大维度。情绪指标常作为反向指标使用。

恐贪指数

加密恐贪指数(Crypto Fear & Greed Index)
分值范围: 0-100

| 分值 | 情绪状态 | 历史信号 |
|------|---------|---------|
| 0-20 | 极度恐惧 | 底部区域(逆向买入)|
| 20-40 | 恐惧 | 偏底部 |
| 40-60 | 中性 | 观望 |
| 60-80 | 贪婪 | 偏顶部 |
| 80-100 | 极度贪婪 | 顶部区域(逆向卖出)|

构成因子:
- 波动率 (25%): BTC 30天/90天波动率
- 市场动量 (25%): BTC价格 vs MA(30/90)
- 社交媒体 (15%): Twitter/Reddit情绪词频
- 调查 (15%): 投资者调查
- 比特币市占率 (10%): BTC Dominance
- Google趋势 (10%): "Bitcoin"搜索热度
A股恐贪指标

A股没有统一的恐贪指数,用以下组合替代:

指标数据源极度恐惧极度贪婪
上证换手率交易所<0.5%>2.5%
涨停家数/跌停家数行情数据<0.3>5.0
新增开户数(周)中登<20万>100万
融资余额变化(月)交易所净流出>500亿净流入>1000亿
ETF净申购基金数据宽基ETF净申购(抄底)净赎回(获利了结)
恐贪指数使用方法
核心原则: 别人恐惧时贪婪,别人贪婪时恐惧

实操:
1. 极度恐惧(<20): 分批建仓信号
   - 不要一次性全仓,分3-5批
   - 确认有基本面支撑(不是暴雷导致的恐惧)

2. 极度贪婪(>80): 逐步减仓信号
   - 不要做空(趋势可能持续)
   - 减仓到安全水位(如从80%仓位降到50%)

3. 中性区间: 情绪指标失效,看其他因素

Put-Call Ratio

定义与解读
Put-Call Ratio = Put期权成交量 / Call期权成交量

| PCR | 含义 | 信号(反向指标)|
|-----|------|----------------|
| > 1.5 | 极度看空情绪 | 看多(恐惧过度)|
| 1.0-1.5 | 偏空 | 偏多 |
| 0.7-1.0 | 中性 | 无明确信号 |
| 0.5-0.7 | 偏多 | 偏空 |
| < 0.5 | 极度看多情绪 | 看空(贪婪过度)|
不同市场PCR参考
市场数据源正常范围极端区间
美股(CBOE)VIX期权0.7-1.2<0.5 或 >1.5
A股(上证50ETF)上交所0.5-1.5<0.3 或 >2.0
BTC(Deribit)Deribit0.3-0.8<0.2 或 >1.2
PCR与VIX配合使用
PCR高 + VIX高 = 极度恐慌(强烈看多反转信号)
PCR低 + VIX低 = 极度自满(警惕黑天鹅)
PCR高 + VIX低 = 对冲需求(机构在保护多头)
PCR低 + VIX高 = 矛盾信号(需要更多确认)

融资融券信号(A股)

融资余额分析
融资 = 借钱买股(看多杠杆)
融券 = 借股卖出(看空杠杆)

融资余额指标:
- 绝对值: 反映杠杆资金总量(2024年约1.5-1.8万亿)
- 变化率: 周环比/月环比,方向比绝对值重要
- 占比: 融资余额/A股总市值,通常2-3%
融资融券信号
指标看多信号看空信号
融资余额底部企稳后连续增加高位加速增加(过热)
融资净买入连续5天净买入连续5天净卖出
融券余额大幅增加后减少(空头回补)突然大增(有人做空)
融资/融券比比值回落后反弹极端高位(杠杆过高)
融资余额历史阈值(A股)
2015年牛市顶部: 2.27万亿(极端)
2018年熊市底部: 0.76万亿
2020年正常区间: 1.0-1.2万亿
2024年正常区间: 1.4-1.8万亿

经验法则: 融资余额月增>10% → 过热警示
          融资余额月减>10% → 恐慌警示

北向资金信号(A股)

北向资金分析框架
北向资金 = 通过沪深港通买A股的外资

核心特征:
1. 规模: 累计净买入约2万亿
2. 风格: 偏好白马(消费+金融+科技龙头)
3. 前瞻性: 历史上多次在底部加仓
4. 局限: 2023年后主动型vs被动型分化
北向资金信号
指标看多信号看空信号
单日净流入>100亿(强烈信号)<-100亿
连续流入天数>10天连续流入>10天连续流出
月度净流入>500亿<-500亿
持仓变化增持低估值白马减持周期+概念股
北向资金使用注意
2023年后变化:
1. 被动资金(ETF)占比上升,主动选股参考价值下降
2. 单日大额波动可能是对冲交易(非方向性)
3. "假外资"(内地资金绕道香港)干扰信号

建议:
- 看周度/月度累计,忽略单日波动
- 区分主动型vs被动型(有些数据源可拆分)
- 与融资余额、ETF申赎交叉验证

社交媒体舆情分析

舆情量化框架
数据源:
- 中文: 雪球/东方财富股吧/微博/微信公众号
- 英文: Twitter(X)/Reddit/Telegram
- 加密: CryptoTwitter/Discord/Telegram群

量化维度:
1. 讨论热度: 提及频次 / 基准频次
2. 情绪倾向: 正面/负面/中性比例
3. 情绪强度: 正面均值 - 负面均值
4. 情绪变化: 较上期的变化方向
舆情指标
指标计算反向信号
热度指数搜索量/讨论量 vs MA(30)热度暴增=过热
看多比例看多帖子/总帖子>80%=极度乐观(警惕)
新人指数新注册账号讨论占比>50%=散户涌入(顶部)
KOL一致性大V观点一致度一致看多=危险
社交媒体情绪周期
底部: 无人讨论 → 少数人抄底 → 争议期
上涨: 讨论增加 → 乐观蔓延 → 新人涌入
顶部: 全民讨论 → 极度乐观 → 不看好者被嘲笑
下跌: 争议 → 恐慌 → 无人讨论(回到底部)

巴菲特指标: 出租车司机/理发师开始讨论股票 = 顶部

综合情绪评分框架

评分模型
综合情绪 = 0.25×恐贪 + 0.20×PCR + 0.20×融资 + 0.20×北向 + 0.15×舆情

每个维度标准化到 0-100:
0-20: 极度恐惧
20-40: 恐惧
40-60: 中性
60-80: 贪婪
80-100: 极度贪婪
情绪 → 操作映射
综合情绪仓位建议操作
0-2080-100%逆向满仓
20-4060-80%逐步加仓
40-6040-60%标准仓位
60-8020-40%逐步减仓
80-1000-20%逆向清仓

输出格式

markdown
## 市场情绪分析

### 情绪仪表盘
| 指标 | 当前值 | 分位 | 信号 |
|------|--------|------|------|
| 恐贪指数(加密) | 72 | 75% | 贪婪 |
| A股换手率 | 1.8% | 70% | 偏活跃 |
| PCR(50ETF) | 0.65 | 35% | 偏乐观 |
| 融资余额变化(周) | +280亿 | 80% | 杠杆加速 |
| 北向净流入(周) | +120亿 | 60% | 偏正面 |

### 综合情绪评分: 68/100(贪婪区间)

### 情绪解读
当前市场情绪偏贪婪,多个指标指向乐观:
- 融资余额加速增长,杠杆资金积极
- 北向资金持续流入,外资态度正面
- 但PCR偏低,期权市场缺乏对冲意识

### 操作建议
- 建议仓位: 降至40-50%
- 不追高,等回调再加仓
- 可适当买入看跌期权对冲

### 风险提示
- 情绪指标是反向指标,不是精确择时工具
- 趋势强时情绪可以持续极端很久

注意事项

  1. 反向指标不是精确择时:情绪可以在极端区域持续很久,不要仅凭情绪做空/做多
  2. 情绪+趋势结合:上升趋势中的贪婪是正常的,下降趋势中的恐惧也是正常的
  3. 不同市场不同阈值:A股、美股、加密的情绪阈值差异大
  4. 数据获取限制:部分情绪数据需要付费API(如Bloomberg情绪指标、Glassnode)
  5. 社交媒体噪音大:机器人/营销号会干扰舆情分析,需要过滤
  6. 北向资金变化:2023年后北向数据披露规则变化,实时数据不如以前透明
  7. 融资数据T+1:融资融券数据为T+1日公布,有滞后

© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agent/src/skills/sentiment-analysis of HKUDS/Vibe-Trading.

Open the folder on GitHubat commit 14cabaf

Compare with similar skills

Market Sentiment Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Market Sentiment Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Market Sentiment Analysis this skillHKUDS/Vibe-Trading35k—~1.1kAutomated safety check: PassMIT
AI-Trader Market IntelHKUDS/AI-Trader23k—~1.1kAutomated safety check: PassNone
Stock Deep Analysis Workflowwbh604/UZI-Skill7.1k—~9.1kAutomated safety check: NotesMIT
Zhengxi Fund Manager Views Librarylyra81604/zhengxi-views1.7k—~1.6kAutomated safety check: PassMIT
Supply Chain Bottleneck Hunterxbtlin/ai-berkshire17k—~2.6kAutomated safety check: PassMIT
Deep Company Article Seriesxbtlin/ai-berkshire17k—~2kAutomated safety check: PassMIT

Similar skills

  • AI-Trader Market Intel

    HKUDS/AI-Trader

    Reads AI-Trader's read-only market snapshots, grouped financial news and events board through its market-intel endpoints, for context before trading or posting.

    23k GitHub stars~1.1k tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed
  • Runs a staged deep analysis of a single stock on China A-share, Hong Kong and US markets, ending in an HTML report with valuation models and investor-panel scores.

    7.1k GitHub stars~9.1k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check: notes
  • Zhengxi Fund Manager Views Library

    lyra81604/zhengxi-views

    Answers questions with sourced quotes from one Chinese fund manager's public writings, applies his stated investment method and compares his words with real fund holdings.

    1.7k GitHub stars~1.6k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Scans a long-running industry trend for supply chain chokepoints, aiming to find second- and third-layer suppliers that the market has not yet priced in.

    17k GitHub stars~2.6k tokensUpdated 2 days ago
    Business, Finance & HRAuto-check passed
  • Deep Company Article Series

    xbtlin/ai-berkshire

    Plans and writes a three-to-eight-part long-form article series that breaks down one company, built on fact-checked financials, valuation and management analysis.

    17k GitHub stars~2k tokensUpdated 2 days ago
    Business, Finance & HRAuto-check passed
  • Longbridge Earnings

    helsome/folio

    Earnings analysis — pre- and post-earnings. An agent skill from helsome/folio.

    269 GitHub starsUsed in 1 repo~2.5k tokens
    Business, Finance & HRAuto-check passed

More from HKUDS/Vibe-Trading

All 89 skills in this repo
  • Eastmoney Market Data

    HKUDS/Vibe-Trading

    Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.

    35k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • OKX Market Data

    HKUDS/Vibe-Trading

    Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.

    35k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • SEC EDGAR Filings Fetcher

    HKUDS/Vibe-Trading

    Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.

    35k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • A-Share ST Risk Screener

    HKUDS/Vibe-Trading

    Predicts whether a mainland China A-share company risks an ST or *ST warning after its next annual report, using financial thresholds and Sina penalty records.

    35k GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.

    35k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Plans and drafts an eight-part, roughly 120k-word investigative series on one company, built around a strict fact-check pass rather than fast drafting.

    35k GitHub stars~2.4k tokensUpdated today
    Auto-check passed

Questions about Market Sentiment Analysis

What does Market Sentiment Analysis do?

Turns market mood into numbers: fear-and-greed gauges, put-call ratio, margin financing, northbound flows and social media chatter, combined into one score. A Chinese-language guide that makes market mood measurable. It covers the crypto fear and greed index and an A-share substitute built from turnover, limit-up and limit-down counts, new accounts, margin balance changes and ETF flows, then put-call ratios with reference ranges for US, A-share and Bitcoin options, margin financing and short-selling balances, northbound capital flows and social media sentiment.

When should I use Market Sentiment Analysis?

Market Sentiment Analysis fits situations like: judging whether a market looks overheated or oversold from sentiment data; interpreting the put-call ratio together with the VIX; reading A-share margin financing and northbound capital signals; building a composite sentiment score from several indicators.

How do I install Market Sentiment Analysis in Claude Code?

Run `npx skills add HKUDS/Vibe-Trading --skill sentiment-analysis -a claude-code`. Or copy the skill folder (agent/src/skills/sentiment-analysis in HKUDS/Vibe-Trading) into .claude/skills/sentiment-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Market Sentiment Analysis in Codex?

Run `npx skills add HKUDS/Vibe-Trading --skill sentiment-analysis -a codex`. Or copy the skill folder (agent/src/skills/sentiment-analysis in HKUDS/Vibe-Trading) into .agents/skills/sentiment-analysis in your project. Codex loads it when a task matches its description.

Can I use Market Sentiment Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/Vibe-Trading --skill sentiment-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sentiment-analysis, .gemini/skills/sentiment-analysis, .github/skills/sentiment-analysis and .opencode/skills/sentiment-analysis in your project.

What does Market Sentiment Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Market Sentiment Analysis is instructions for the agent only.

Does Market Sentiment Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Market Sentiment Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Market Sentiment Analysis use?

Market Sentiment Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Market Sentiment Analysis use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Market Sentiment Analysis?

Skills that share tags, products or a category with Market Sentiment Analysis: AI-Trader Market Intel (HKUDS/AI-Trader, 23k stars), Stock Deep Analysis Workflow (wbh604/UZI-Skill, 7.1k stars), Zhengxi Fund Manager Views Library (lyra81604/zhengxi-views, 1.7k stars) and Supply Chain Bottleneck Hunter (xbtlin/ai-berkshire, 17k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Market Sentiment Analysis?

HKUDS (a GitHub organization) maintains it in HKUDS/Vibe-Trading, which has 34,949 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 8, 2026.

Source: HKUDS/Vibe-Trading on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.