mcpField
A
analyzing-market-sentiment

analyzing-market-sentiment

github.com/jeremylongshore数据与数据库2.9k86 次安装2 天前更新
代码仓库

关于 analyzing-market-sentiment

一项加密货币市场情绪分析技能,将恐惧与贪婪指数、新闻关键词以及价格和成交量动量合成为综合评分。可分析整体市场或指定币种,并提供各组成部分的详细拆解。

主要功能

  1. 01综合三类情绪指标
  2. 02生成加权 0–100 评分
  3. 03分析整体市场或指定币种
  4. 04展示各指标的评分拆解
  5. 05将结果导出为 JSON

适用场景

  1. 01检查整体加密市场情绪
  2. 02分析 BTC 等指定币种情绪
  3. 03详细查看各组成指标的影响
  4. 04为交易模型导出评分

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace --skill analyzing-market-sentiment

安装后在 Claude Code 中输入/analyzing-market-sentiment确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

ARD.md
PRD.md
config/
settings.yaml
references/
errors.md
examples.md
implementation.md
scripts/
fear_greed.py
formatters.py
market_momentum.py
news_sentiment.py
sentiment_analyzer.py

详细介绍

市场情绪分析

概述

结合恐惧与贪婪指数、新闻关键词分析以及价格/成交量动量,对加密货币市场情绪进行分析,并得出 0-100 的综合评分。

前提条件

  1. 已安装 Python 3.8+
  2. 依赖项:pip install requests
  3. 可连接互联网以访问 API(Alternative.me、CoinGecko)
  4. 可选:使用 crypto-news-aggregator skill 增强新闻分析

操作说明

  1. 评估用户意图——确定所需的分析:

    • 整体市场:未指定币种,分析总体情绪
    • 特定币种:提取币种符号(BTC、ETH 等)
    • 快速或详细:快速评分或完整的分项明细
  2. 运行情绪分析并设置适当选项:

    # Quick market sentiment check
    python ${CLAUDE_SKILL_DIR}/scripts/sentiment_analyzer.py
    
    # Coin-specific sentiment
    python ${CLAUDE_SKILL_DIR}/scripts/sentiment_analyzer.py --coin BTC
    
    # Detailed breakdown with all components
    python ${CLAUDE_SKILL_DIR}/scripts/sentiment_analyzer.py --detailed
    
    # Custom time period
    python ${CLAUDE_SKILL_DIR}/scripts/sentiment_analyzer.py --period 7d --detailed
    
  3. 导出结果,用于交易模型或分析:

    python ${CLAUDE_SKILL_DIR}/scripts/sentiment_analyzer.py --format json --output sentiment.json
    
  4. 向用户呈现结果:

    • 显著展示综合评分和分类
    • 说明情绪读数的含义
    • 突出显示极端读数(潜在的反向指标)
    • 在详细模式下,显示带权重的分项明细

输出

带分类和加权分项明细的综合情绪评分(0-100)。极端读数可作为反向指标:

==============================================================================
  MARKET SENTIMENT ANALYZER                         Updated: 2026-01-14 15:30  # 2026 - current year timestamp
==============================================================================

  COMPOSITE SENTIMENT
------------------------------------------------------------------------------
  Score: 65.5 / 100                         Classification: GREED

  Component Breakdown:
  - Fear & Greed Index:  72.0  (weight: 40%)  -> 28.8 pts
  - News Sentiment:      58.5  (weight: 40%)  -> 23.4 pts
  - Market Momentum:     66.5  (weight: 20%)  -> 13.3 pts

  Interpretation: Market is moderately greedy. Consider taking profits or
  reducing position sizes. Watch for reversal signals.

==============================================================================

错误处理

错误原因解决方案
恐惧与贪婪指数不可用API 故障使用缓存值并发出警告
获取新闻失败网络问题降低新闻分项的权重
无效币种未知符号继续进行全市场分析

有关全面的错误处理信息,请参阅 ${CLAUDE_SKILL_DIR}/references/errors.md。

示例

从快速检查到自定义权重的深度分析的情绪分析模式:

# Quick market sentiment
python ${CLAUDE_SKILL_DIR}/scripts/sentiment_analyzer.py

# Bitcoin-specific sentiment
python ${CLAUDE_SKILL_DIR}/scripts/sentiment_analyzer.py --coin BTC

# Detailed analysis with component breakdown
python ${CLAUDE_SKILL_DIR}/scripts/sentiment_analyzer.py --detailed

# Custom weights emphasizing news
python ${CLAUDE_SKILL_DIR}/scripts/sentiment_analyzer.py --weights "news:0.5,fng:0.3,momentum:0.2"

# Weekly sentiment trend
python ${CLAUDE_SKILL_DIR}/scripts/sentiment_analyzer.py --period 7d --detailed

资源

  • ${CLAUDE_SKILL_DIR}/references/implementation.md - CLI 选项、分类、JSON 格式、反向理论
  • ${CLAUDE_SKILL_DIR}/references/errors.md - 全面的错误处理
  • ${CLAUDE_SKILL_DIR}/references/examples.md - 详细用法示例
  • Alternative.me 恐惧与贪婪指数:https://alternative.me/crypto/fear-and-greed-index/
  • CoinGecko API:https://www.coingecko.com/en/api
  • ${CLAUDE_SKILL_DIR}/config/settings.yaml - 配置选项

评论

支持 Markdown