mcpField
U
uptrend-analyzer

uptrend-analyzer

github.com/mphinanceデータ・データベース3286 回インストール5 日前に更新
リポジトリ

uptrend-analyzer について

uptrend-analyzer は、無料の CSV データを使って米国市場の市場の広がりとセクター参加状況を評価するスキルです。5 つのシグナルを採点し、エクスポージャー指針やレポート、セクター分析を作成します。

主な機能

  1. 015 項目の総合スコア
  2. 02セクター参加とローテーション分析
  3. 03モメンタムと過去データの評価
  4. 04警告と信頼度の評価
  5. 05JSON と Markdown のレポート

活用シーン

  1. 01相場上昇の広がりの評価
  2. 02セクター別上昇トレンド比率の比較
  3. 03市場の広がりに基づくエクスポージャー指針の確認

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/mphinance/alpha-skills --skill uptrend-analyzer

インストール後、Claude Code で/uptrend-analyzerを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

README.md
references/
uptrend_methodology.md
scripts/
data_fetcher.py
report_generator.py
scorer.py
uptrend_analyzer.py
scripts/calculators/
__init__.py
historical_context_calculator.py
market_breadth_calculator.py
momentum_calculator.py
sector_participation_calculator.py
sector_rotation_calculator.py
scripts/tests/
conftest.py
helpers.py
test_data_fetcher.py
test_historical_context_calculator.py
test_market_breadth_calculator.py
test_momentum_calculator.py
test_new_features.py
test_report_generator.py
test_scorer.py
test_sector_participation_calculator.py
test_sector_rotation_calculator.py
test_uptrend_analyzer.py

詳細

Uptrend Analyzer Skill

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.

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のアップトレンドダッシュボードについて質問

Difference from 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

Execution Workflow

Phase 1: Execute Python Script

Run the analysis script (no API key needed):

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
Phase 2: Present Results

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

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

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%)
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
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.

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.

履歴信頼度インジケーター

Historical Context コンポーネントには、以下に基づく信頼度評価が含まれます。

  • サンプルサイズ: 利用可能な履歴データポイントの数
  • レジームカバレッジ: 観測された異なる市場レジーム(強気/弱気/中立)の割合
  • 最新性: 最新のデータポイントがどれだけ最近のものか

信頼度レベル: 高、中、低。


API 要件

必須: なし(無料の GitHub CSV データを使用)

出力ファイル

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

参照ドキュメント

references/uptrend_methodology.md
  • 上昇トレンド比率の定義としきい値
  • 5コンポーネントのスコアリング手法
  • セクター分類(景気循環/ディフェンシブ/コモディティ)
  • 履歴キャリブレーションに関する注記
参照を読み込むタイミング
  • 初回使用時: フレームワーク全体を理解するために uptrend_methodology.md を読み込んでください
  • 通常実行時: 参照は不要です - スクリプトがスコアリングを処理します

コメント