analyzing-market-sentiment
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAnalyzing 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:
- Python 3.8+ is installed
- requests library is available:
pip install requests - Internet connectivity for API access (Alternative.me, CoinGecko)
- Optional: skill for enhanced news analysis
crypto-news-aggregator
使用本skill前,请确保:
- 已安装Python 3.8+
- 已安装requests库:
pip install requests - 具备API访问的网络连接(Alternative.me、CoinGecko)
- 可选:安装skill以增强新闻分析能力
crypto-news-aggregator
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
undefinedQuick 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
undefinedpython {baseDir}/scripts/sentiment_analyzer.py --period 7d --detailed
undefinedStep 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
命令行选项
| Option | Description | Default |
|---|---|---|
| Analyze specific coin (BTC, ETH, etc.) | All market |
| Time period (1h, 4h, 24h, 7d) | 24h |
| Show full component breakdown | false |
| Output format (table, json, csv) | table |
| Output file path | stdout |
| Custom weights (e.g., "news:0.5,fng:0.3,momentum:0.2") | Default |
| Enable verbose output | false |
| 选项 | 描述 | 默认值 |
|---|---|---|
| 分析特定币种(BTC、ETH等) | 全市场 |
| 时间周期(1h、4h、24h、7d) | 24h |
| 展示完整的组成部分拆解 | false |
| 输出格式(table、json、csv) | table |
| 输出文件路径 | stdout |
| 自定义权重(例如:"news:0.5,fng:0.3,momentum:0.2") | 默认值 |
| 启用详细输出 | false |
Sentiment Classifications
情绪分类
| Score Range | Classification | Description |
|---|---|---|
| 0-20 | Extreme Fear | Market panic, potential bottom |
| 21-40 | Fear | Cautious sentiment, bearish |
| 41-60 | Neutral | Balanced, no strong bias |
| 61-80 | Greed | Optimistic, bullish sentiment |
| 81-100 | Extreme Greed | Euphoria, 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 for comprehensive error handling.
{baseDir}/references/errors.md| Error | Cause | Solution |
|---|---|---|
| Fear & Greed unavailable | API down | Uses cached value with warning |
| News fetch failed | Network issue | Reduces weight of news component |
| Invalid coin | Unknown symbol | Proceeds with market-wide analysis |
详见获取全面的错误处理说明。
{baseDir}/references/errors.md| 错误 | 原因 | 解决方案 |
|---|---|---|
| Fear & Greed Index不可用 | API故障 | 使用缓存值并发出警告 |
| 新闻获取失败 | 网络问题 | 降低新闻组件的权重 |
| 无效币种 | 未知符号 | 继续执行全市场分析 |
Examples
示例
See for detailed examples.
{baseDir}/references/examples.md详见获取详细示例。
{baseDir}/references/examples.mdQuick Examples
快速示例
bash
undefinedbash
undefinedQuick 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
undefinedpython {baseDir}/scripts/sentiment_analyzer.py --period 7d --detailed
undefinedResources
资源
- Alternative.me Fear & Greed Index: https://alternative.me/crypto/fear-and-greed-index/
- CoinGecko API: https://www.coingecko.com/en/api
- Sentiment Analysis Theory: Contrarian indicator - extreme readings often precede reversals
- See for configuration options
{baseDir}/config/settings.yaml
- Alternative.me Fear & Greed Index:https://alternative.me/crypto/fear-and-greed-index/
- CoinGecko API:https://www.coingecko.com/en/api
- 情绪分析理论:反向指标——极端读数通常预示趋势反转
- 配置选项详见
{baseDir}/config/settings.yaml