uptrend-analyzer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Uptrend Analyzer Skill

Uptrend Analyzer 分析工具

Purpose

用途

Diagnose market breadth health using Monty's Uptrend Ratio Dashboard, which tracks ~2,800 US stocks across 11 sectors. Generates a 0-100 composite score (higher = healthier) with exposure guidance.
Unlike the Market Top Detector (API-based risk scorer), this skill uses free CSV data to assess "participation breadth" - whether the market's advance is broad or narrow.
借助Monty的上涨趋势比率仪表板诊断市场广度健康状况,该仪表板追踪11个板块的约2800只美股。生成0-100的综合评分(分数越高表示市场越健康)并提供敞口指导。
与基于API的风险评分工具Market Top Detector不同,本工具使用免费CSV数据评估「参与广度」——即市场上涨是普涨还是结构性上涨。

When to Use This Skill

适用场景

English:
  • User asks "Is the market breadth healthy?" or "How broad is the rally?"
  • User wants to assess uptrend ratios across sectors
  • User asks about market participation or breadth conditions
  • User needs exposure guidance based on breadth analysis
  • User references Monty's Uptrend Dashboard or uptrend ratios
Japanese:
  • 「市場のブレドスは健全?」「上昇の裾野は広い?」
  • セクター別のアップトレンド比率を確認したい
  • 相場参加率・ブレドス状況を診断したい
  • ブレドス分析に基づくエクスポージャーガイダンスが欲しい
  • Montyのアップトレンドダッシュボードについて質問
中文适用场景:
  • 用户询问"市场广度是否健康?"或"上涨行情的广度如何?"
  • 用户希望评估各板块的上涨趋势比率
  • 用户询问市场参与度或广度状况
  • 用户需要基于广度分析的敞口指导
  • 用户提及Monty的上涨趋势仪表板或上涨趋势比率
日文适用场景:
  • 「市場のブレドスは健全?」「上昇の裾野は広い?」
  • セクター別のアップトレンド比率を確認したい
  • 相場参加率・ブレドス状況を診断したい
  • ブレドス分析に基づくエクスポージャーガイダンスが欲しい
  • Montyのアップトレンドダッシュボードについて質問

Difference from Market Top Detector

与Market Top Detector的区别

AspectUptrend AnalyzerMarket Top Detector
Score DirectionHigher = healthierHigher = riskier
Data SourceFree GitHub CSVFMP API (paid)
FocusBreadth participationTop formation risk
API KeyNot requiredRequired (FMP)
MethodologyMonty Uptrend RatiosO'Neil/Minervini/Monty

维度Uptrend AnalyzerMarket Top Detector
评分方向分数越高=市场越健康分数越高=风险越高
数据源免费GitHub CSV付费FMP API
关注重点参与广度顶部形成风险
API密钥无需需要(FMP)
方法论Monty上涨趋势比率O'Neil/Minervini/Monty

Execution Workflow

执行流程

Phase 1: Execute Python Script

阶段1:运行Python脚本

Run the analysis script (no API key needed):
bash
python3 skills/uptrend-analyzer/scripts/uptrend_analyzer.py
The script will:
  1. Download CSV data from Monty's GitHub repository
  2. Calculate 5 component scores
  3. Generate composite score and reports
运行分析脚本(无需API密钥):
bash
python3 skills/uptrend-analyzer/scripts/uptrend_analyzer.py
脚本将执行以下操作:
  1. 从Monty的GitHub仓库下载CSV数据
  2. 计算5个维度的得分
  3. 生成综合评分和报告

Phase 2: Present Results

阶段2:展示结果

Present the generated Markdown report to the user, highlighting:
  • Composite score and zone classification
  • Exposure guidance (Full/Normal/Reduced/Defensive/Preservation)
  • Sector heatmap showing strongest and weakest sectors
  • Key momentum and rotation signals

向用户展示生成的Markdown报告,重点突出:
  • 综合评分和区间分类
  • 敞口指导(全额/正常/减少/防御/保值)
  • 板块热力图,显示最强和最弱板块
  • 关键动量和轮动信号

5-Component Scoring System

五维度评分体系

#ComponentWeightKey Signal
1Market Breadth (Overall)30%Ratio level + trend direction
2Sector Participation25%Uptrend sector count + ratio spread
3Sector Rotation15%Cyclical vs Defensive balance
4Momentum20%Slope direction + acceleration
5Historical Context10%Percentile rank in history
#维度权重关键信号
1整体市场广度30%比率水平+趋势方向
2板块参与度25%处于上涨趋势的板块数量+比率差值
3板块轮动15%周期股vs防御股的平衡状况
4动量20%斜率方向+加速度
5历史背景10%历史百分位排名

Scoring Zones

评分区间

ScoreZoneExposure Guidance
80-100Strong BullFull Exposure (100%)
60-79BullNormal Exposure (80-100%)
40-59NeutralReduced Exposure (60-80%)
20-39CautiousDefensive (30-60%)
0-19BearCapital Preservation (0-30%)
分数区间敞口指导
80-100强势牛市全额敞口(100%)
60-79牛市正常敞口(80-100%)
40-59中性减少敞口(60-80%)
20-39谨慎防御性敞口(30-60%)
0-19熊市资本保值(0-30%)

7-Level Zone Detail

七级区间细分

Each scoring zone is further divided into sub-zones for finer-grained assessment:
ScoreZone DetailColor
80-100Strong BullGreen
70-79Bull-UpperLight Green
60-69Bull-LowerLight Green
40-59NeutralYellow
30-39Cautious-UpperOrange
20-29Cautious-LowerOrange
0-19BearRed
每个评分区间进一步细分为子区间,以便更精细的评估:
分数细分区间颜色
80-100强势牛市绿色
70-79牛市-高位浅绿色
60-69牛市-低位浅绿色
40-59中性黄色
30-39谨慎-高位橙色
20-29谨慎-低位橙色
0-19熊市红色

Warning System

预警系统

Active warnings trigger exposure penalties that tighten guidance even when the composite score is high:
WarningConditionPenalty
Late CycleCommodity avg > both Cyclical and Defensive-5
High SpreadMax-min sector ratio spread > 40pp-3
DivergenceIntra-group std > 8pp, spread > 20pp, or trend dissenters-3
Penalties stack (max -10) + multi-warning discount (+1 when ≥2 active). Applied after composite scoring.
当触发主动预警时,会对敞口指导进行扣分,即使综合评分较高也会收紧指导:
预警类型触发条件扣分值
周期末期大宗商品平均比率>周期股和防御股的比率-5
高差值板块比率最大差值>40个百分点-3
背离板块内部标准差>8个百分点、差值>20个百分点,或趋势分歧-3
扣分可叠加(最多扣10分),且当有≥2个预警触发时,会给予多重预警折扣(+1分)。扣分在综合评分计算完成后应用。

Momentum Smoothing

动量平滑处理

Slope values are smoothed using EMA(3) (Exponential Moving Average, span=3) before scoring. Acceleration is calculated by comparing the recent 10-point average vs prior 10-point average of smoothed slopes (10v10 window), with fallback to 5v5 when fewer than 20 data points are available.
在评分前,使用EMA(3)(指数移动平均线,周期=3)对斜率值进行平滑处理。加速度通过比较平滑后斜率的近期10点平均值与之前10点平均值(10v10窗口)计算得出,当可用数据点少于20个时, fallback到5v5窗口。

Historical Confidence Indicator

历史置信度指标

The Historical Context component includes a confidence assessment based on:
  • Sample size: Number of historical data points available
  • Regime coverage: Proportion of distinct market regimes (bull/bear/neutral) observed
  • Recency: How recent the latest data point is
Confidence levels: High, Medium, Low.

历史背景维度包含基于以下因素的置信度评估:
  • 样本量: 可用历史数据点的数量
  • 周期覆盖: 观察到的不同市场周期(牛市/熊市/中性)的占比
  • 时效性: 最新数据点的时间远近
置信度等级:高、中、低。

API Requirements

API要求

Required: None (uses free GitHub CSV data)
所需API: 无(使用免费GitHub CSV数据)

Output Files

输出文件

  • JSON:
    uptrend_analysis_YYYY-MM-DD_HHMMSS.json
  • Markdown:
    uptrend_analysis_YYYY-MM-DD_HHMMSS.md
  • JSON:
    uptrend_analysis_YYYY-MM-DD_HHMMSS.json
  • Markdown:
    uptrend_analysis_YYYY-MM-DD_HHMMSS.md

Reference Documents

参考文档

references/uptrend_methodology.md

references/uptrend_methodology.md

  • Uptrend Ratio definition and thresholds
  • 5-component scoring methodology
  • Sector classification (Cyclical/Defensive/Commodity)
  • Historical calibration notes
  • 上涨趋势比率的定义和阈值
  • 五维度评分方法论
  • 板块分类(周期股/防御股/大宗商品)
  • 历史校准说明

When to Load References

何时加载参考文档

  • First use: Load
    uptrend_methodology.md
    for full framework understanding
  • Regular execution: References not needed - script handles scoring
  • 首次使用: 加载
    uptrend_methodology.md
    以全面理解框架
  • 常规执行: 无需参考文档——脚本会自动处理评分