analyzing-market-sentiment

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Analyzing Market Sentiment

市场情绪分析

Overview

概述

This skill provides comprehensive cryptocurrency market sentiment analysis by combining multiple data sources:
  • Fear & Greed Index: Market-wide sentiment from Alternative.me
  • News Sentiment: Keyword-based analysis of recent crypto news
  • Market Momentum: Price and volume trends from CoinGecko
Key Capabilities:
  • Composite sentiment score (0-100) with classification
  • Coin-specific sentiment analysis
  • Detailed breakdown of sentiment components
  • Multiple output formats (table, JSON, CSV)
本skill结合多数据源,提供全面的加密货币市场情绪分析:
  • Fear & Greed Index:来自Alternative.me的全市场情绪数据
  • 新闻情绪:基于关键词的近期加密货币新闻分析
  • 市场动量:来自CoinGecko的价格和交易量趋势
核心功能:
  • 综合情绪评分(0-100)及分类
  • 特定币种的情绪分析
  • 情绪组成部分的详细拆解
  • 多种输出格式(表格、JSON、CSV)

Prerequisites

前置条件

Before using this skill, ensure:
  1. Python 3.8+ is installed
  2. requests library is available:
    pip install requests
  3. Internet connectivity for API access (Alternative.me, CoinGecko)
  4. Optional:
    crypto-news-aggregator
    skill for enhanced news analysis
使用本skill前,请确保:
  1. 已安装Python 3.8+
  2. 已安装requests库:
    pip install requests
  3. 具备API访问的网络连接(Alternative.me、CoinGecko)
  4. 可选:安装
    crypto-news-aggregator
    skill以增强新闻分析能力

Instructions

使用说明

Step 1: Assess User Intent

步骤1:评估用户需求

Determine what sentiment analysis the user needs:
  • Overall market: No specific coin, general sentiment
  • Coin-specific: Extract coin symbol (BTC, ETH, etc.)
  • Quick vs detailed: Quick score or full breakdown
确定用户需要的情绪分析类型:
  • 全市场分析:无特定币种,针对整体市场情绪
  • 特定币种分析:提取币种符号(BTC、ETH等)
  • 快速/详细分析:仅获取快速评分或完整拆解报告

Step 2: Execute Sentiment Analysis

步骤2:执行情绪分析

Run the sentiment analyzer with appropriate options:
bash
undefined
通过合适的选项运行情绪分析工具:
bash
undefined

Quick sentiment check (default)

快速情绪检查(默认)

python {baseDir}/scripts/sentiment_analyzer.py
python {baseDir}/scripts/sentiment_analyzer.py

Coin-specific sentiment

特定币种情绪分析

python {baseDir}/scripts/sentiment_analyzer.py --coin BTC
python {baseDir}/scripts/sentiment_analyzer.py --coin BTC

Detailed analysis with component breakdown

带组成部分拆解的详细分析

python {baseDir}/scripts/sentiment_analyzer.py --detailed
python {baseDir}/scripts/sentiment_analyzer.py --detailed

Export to JSON

导出为JSON格式

python {baseDir}/scripts/sentiment_analyzer.py --format json --output sentiment.json
python {baseDir}/scripts/sentiment_analyzer.py --format json --output sentiment.json

Custom time period

自定义时间周期

python {baseDir}/scripts/sentiment_analyzer.py --period 7d --detailed
undefined
python {baseDir}/scripts/sentiment_analyzer.py --period 7d --detailed
undefined

Step 3: Present Results

步骤3:展示结果

Format and present the sentiment analysis:
  • Show composite score and classification
  • Explain what the sentiment means
  • Highlight any extreme readings
  • For detailed mode, show component breakdown
格式化并展示情绪分析结果:
  • 显示综合评分及分类
  • 解释情绪含义
  • 突出极端读数
  • 详细模式下展示各组成部分的拆解

Command-Line Options

命令行选项

OptionDescriptionDefault
--coin
Analyze specific coin (BTC, ETH, etc.)All market
--period
Time period (1h, 4h, 24h, 7d)24h
--detailed
Show full component breakdownfalse
--format
Output format (table, json, csv)table
--output
Output file pathstdout
--weights
Custom weights (e.g., "news:0.5,fng:0.3,momentum:0.2")Default
--verbose
Enable verbose outputfalse
选项描述默认值
--coin
分析特定币种(BTC、ETH等)全市场
--period
时间周期(1h、4h、24h、7d)24h
--detailed
展示完整的组成部分拆解false
--format
输出格式(table、json、csv)table
--output
输出文件路径stdout
--weights
自定义权重(例如:"news:0.5,fng:0.3,momentum:0.2")默认值
--verbose
启用详细输出false

Sentiment Classifications

情绪分类

Score RangeClassificationDescription
0-20Extreme FearMarket panic, potential bottom
21-40FearCautious sentiment, bearish
41-60NeutralBalanced, no strong bias
61-80GreedOptimistic, bullish sentiment
81-100Extreme GreedEuphoria, potential top
评分范围分类描述
0-20极端恐慌市场恐慌,可能触底
21-40恐慌情绪谨慎,熊市倾向
41-60中性情绪平衡,无明显倾向
61-80贪婪情绪乐观,牛市倾向
81-100极端贪婪市场亢奋,可能见顶

Output

输出示例

Table Format (Default)

表格格式(默认)

==============================================================================
  MARKET SENTIMENT ANALYZER                         Updated: 2026-01-14 15:30
==============================================================================

  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.

==============================================================================
==============================================================================
  MARKET SENTIMENT ANALYZER                         Updated: 2026-01-14 15:30
==============================================================================

  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.

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

JSON Format

JSON格式

json
{
  "composite_score": 65.5,
  "classification": "Greed",
  "components": {
    "fear_greed": {
      "score": 72,
      "classification": "Greed",
      "weight": 0.40,
      "contribution": 28.8
    },
    "news_sentiment": {
      "score": 58.5,
      "articles_analyzed": 25,
      "positive": 12,
      "negative": 5,
      "neutral": 8,
      "weight": 0.40,
      "contribution": 23.4
    },
    "market_momentum": {
      "score": 66.5,
      "btc_change_24h": 3.5,
      "weight": 0.20,
      "contribution": 13.3
    }
  },
  "meta": {
    "timestamp": "2026-01-14T15:30:00Z",
    "period": "24h"
  }
}
json
{
  "composite_score": 65.5,
  "classification": "Greed",
  "components": {
    "fear_greed": {
      "score": 72,
      "classification": "Greed",
      "weight": 0.40,
      "contribution": 28.8
    },
    "news_sentiment": {
      "score": 58.5,
      "articles_analyzed": 25,
      "positive": 12,
      "negative": 5,
      "neutral": 8,
      "weight": 0.40,
      "contribution": 23.4
    },
    "market_momentum": {
      "score": 66.5,
      "btc_change_24h": 3.5,
      "weight": 0.20,
      "contribution": 13.3
    }
  },
  "meta": {
    "timestamp": "2026-01-14T15:30:00Z",
    "period": "24h"
  }
}

Error Handling

错误处理

See
{baseDir}/references/errors.md
for comprehensive error handling.
ErrorCauseSolution
Fear & Greed unavailableAPI downUses cached value with warning
News fetch failedNetwork issueReduces weight of news component
Invalid coinUnknown symbolProceeds with market-wide analysis
详见
{baseDir}/references/errors.md
获取全面的错误处理说明。
错误原因解决方案
Fear & Greed Index不可用API故障使用缓存值并发出警告
新闻获取失败网络问题降低新闻组件的权重
无效币种未知符号继续执行全市场分析

Examples

示例

See
{baseDir}/references/examples.md
for detailed examples.
详见
{baseDir}/references/examples.md
获取详细示例。

Quick Examples

快速示例

bash
undefined
bash
undefined

Quick market sentiment check

快速全市场情绪检查

python {baseDir}/scripts/sentiment_analyzer.py
python {baseDir}/scripts/sentiment_analyzer.py

Bitcoin-specific sentiment

比特币特定情绪分析

python {baseDir}/scripts/sentiment_analyzer.py --coin BTC
python {baseDir}/scripts/sentiment_analyzer.py --coin BTC

Detailed analysis

详细分析

python {baseDir}/scripts/sentiment_analyzer.py --detailed
python {baseDir}/scripts/sentiment_analyzer.py --detailed

Export for trading model

导出结果供交易模型使用

python {baseDir}/scripts/sentiment_analyzer.py --format json --output sentiment.json
python {baseDir}/scripts/sentiment_analyzer.py --format json --output sentiment.json

Custom weights (emphasize news)

自定义权重(侧重新闻)

python {baseDir}/scripts/sentiment_analyzer.py --weights "news:0.5,fng:0.3,momentum:0.2"
python {baseDir}/scripts/sentiment_analyzer.py --weights "news:0.5,fng:0.3,momentum:0.2"

Weekly sentiment comparison

周度情绪对比分析

python {baseDir}/scripts/sentiment_analyzer.py --period 7d --detailed
undefined
python {baseDir}/scripts/sentiment_analyzer.py --period 7d --detailed
undefined

Resources

资源