analyze-investment-clock-rotation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<essential_principles>
<principle name="quadrant_model"> **四象限模型核心**
投資時鐘將市場狀態簡化為四個象限:
          金融環境支持(寬鬆)
       Q3      │      Q1
     修復過渡   │   理想象限
  ────────────┼────────────→ 獲利成長
       Q4      │      Q2
     最差象限   │   好壞混合
          金融環境不支持(緊縮)
象限獲利金融環境含義配置建議
Q1 理想象限支持↑風險資產友善偏多、順風配置
Q2 好壞混合不支持↓估值壓力、波動波動管理、估值敏感
Q3 修復過渡支持↑寬鬆救市、基本面未回勿誤判為全面牛市
Q4 最差象限不支持↓風險資產易受傷風險控管、降槓桿
</principle> <principle name="axis_convention"> **軸向約定(重要!)**
不同來源的投資時鐘圖可能有不同的軸向定義。本 skill 預設:
  • X 軸:金融環境(Financial Conditions)
    • 左側 = 寬鬆(支持性高)
    • 右側 = 緊縮(支持性低)
  • Y 軸:獲利成長(Earnings Growth)
    • 上方 = 正成長
    • 下方 = 負成長
若你的圖表定義不同,請在輸入參數中調整
axis_mapping
clock_convention
</principle>
<principle name="clock_hour"> **時鐘點位計算**
透過
atan2(y, x)
計算角度,再轉換成 12 小時制:
  • 12 點:正上方(獲利最高、金融環境中性)
  • 3 點:右側(金融環境最緊)
  • 6 點:正下方(獲利最低)
  • 9 點:左側(金融環境最寬鬆)
旋轉方向
  • 順時針:典型景氣循環路徑(Q1 → Q2 → Q4 → Q3 → Q1)
  • 逆時針:政策干預或非典型事件 </principle>
<principle name="data_access"> **資料取得方式**
本 skill 使用無需 API key 的資料來源:
  • FRED CSV:
    https://fred.stlouisfed.org/graph/fredgraph.csv?id={SERIES_ID}
    • 金融環境:NFCI(Chicago Fed)、STLFSI4(St. Louis Fed)
    • 獲利代理:CP(企業利潤)、GDP 相關指標
腳本位於
scripts/
目錄,可直接執行。 </principle>
</essential_principles>
<objective> 實作投資時鐘分析:
  1. 建構座標:從 FRED 數據計算獲利成長與金融環境 Z-score
  2. 判定象限:識別當前落在哪個象限
  3. 計算點位:轉換為 12 小時制時鐘點位
  4. 分析旋轉:判斷旋轉方向與幅度
  5. 循環比較:與前一輪循環比較(可選)
輸出:當前象限、時鐘點位、旋轉摘要、配置建議。 </objective>
<quick_start>
最快的方式:執行預設分析
bash
cd skills/analyze-investment-clock-rotation
pip install pandas numpy requests  # 首次使用
python scripts/investment_clock.py --quick
輸出範例:
json
{
  "as_of": "2026-01-15",
  "current_position": {
    "clock_hour": 10,
    "quadrant": "Q1_ideal",
    "earnings_growth": 0.052,
    "financial_conditions_zscore": -0.35
  },
  "interpretation": "理想象限,風險資產相對順風"
}
完整分析
bash
python scripts/investment_clock.py \
  --start 2022-01-01 \
  --end 2026-01-19 \
  --compare-cycle 2020-01-01 2022-12-31 \
  --output result.json
</quick_start>
<intake> 需要進行什麼操作?
  1. 快速檢查 - 查看目前的投資時鐘位置與象限
  2. 完整分析 - 分析時間區間內的旋轉路徑與方向
  3. 循環比較 - 與前一輪循環比較旋轉特徵
  4. 視覺化圖表 - 生成投資時鐘視覺化圖表
  5. 方法論學習 - 了解投資時鐘模型的邏輯
請選擇或直接提供分析參數。 </intake>
<routing> | Response | Action | |--------------------------------|----------------------------------------------------| | 1, "快速", "quick", "check" | 執行 `python scripts/investment_clock.py --quick` | | 2, "完整", "分析", "full" | 閱讀 `workflows/analyze.md` 並執行 | | 3, "比較", "循環", "compare" | 閱讀 `workflows/compare-cycle.md` 並執行 | | 4, "視覺化", "chart", "plot" | 閱讀 `workflows/visualize.md` 並執行 | | 5, "學習", "方法論", "why" | 閱讀 `references/methodology.md` | | 提供參數 (如日期範圍) | 閱讀 `workflows/analyze.md` 並使用參數執行 |
路由後,閱讀對應文件並執行。 </routing>
<directory_structure>
analyze-investment-clock-rotation/
├── SKILL.md                           # 本文件(路由器)
├── skill.yaml                         # 前端展示元數據
├── manifest.json                      # 技能元數據
├── workflows/
│   ├── analyze.md                     # 完整分析工作流
│   ├── compare-cycle.md               # 循環比較工作流
│   └── visualize.md                   # 視覺化工作流
├── references/
│   ├── methodology.md                 # 投資時鐘方法論
│   ├── data-sources.md                # FRED 系列代碼與資料來源
│   └── input-schema.md                # 完整輸入參數定義
├── templates/
│   ├── output-json.md                 # JSON 輸出模板
│   └── output-markdown.md             # Markdown 報告模板
└── scripts/
    ├── investment_clock.py            # 主分析腳本
    ├── fetch_data.py                  # 數據抓取工具
    └── visualize.py                   # 視覺化繪圖工具
</directory_structure>
<reference_index>
方法論: references/methodology.md
  • 投資時鐘概念與歷史
  • 四象限定義與配置含義
  • 旋轉方向解讀
資料來源: references/data-sources.md
  • FRED 系列代碼(金融環境/獲利代理)
  • 數據頻率與對齊方法
輸入參數: references/input-schema.md
  • 完整參數定義
  • 預設值與建議範圍
</reference_index>
<workflows_index>
WorkflowPurpose使用時機
analyze.md完整分析需要詳細象限與旋轉分析
compare-cycle.md循環比較比較不同循環的特徵
visualize.md生成視覺化圖表需要圖表展示
</workflows_index>
<templates_index>
TemplatePurpose
output-json.mdJSON 輸出結構定義
output-markdown.mdMarkdown 報告模板
</templates_index>
<scripts_index>
ScriptCommandPurpose
investment_clock.py
--quick
快速檢查當前位置
investment_clock.py
--start DATE --end DATE
完整分析
investment_clock.py
--compare-cycle START END
循環比較
fetch_data.py
--series NFCI,CP
抓取 FRED 資料
visualize.py
-i result.json -o chart.png
生成視覺化圖表
</scripts_index>
<input_schema_summary>
核心參數
參數類型預設值說明
marketstringUS_EQUITY分析標的
start_datestring2022-01-01分析起點
end_datestringtoday分析終點
freqstringweekly頻率(weekly/monthly)
資料來源參數
參數類型說明
earnings_series.sourcestringfred / api / csv / manual
earnings_series.series_idstringFRED 序列 ID(如 CP)
earnings_series.growth_methodstringyoy / qoq_annualized
financial_conditions_series.sourcestringfred / api / csv
financial_conditions_series.series_idstringNFCI / STLFSI4
financial_conditions_series.transformstringlevel / zscore / inverse
軸向參數
參數類型預設值說明
axis_mapping.xstringfinancial_conditionsX 軸定義
axis_mapping.ystringearnings_growthY 軸定義
clock_convention.financial_loose_is_leftbooltrue寬鬆在左側
完整參數定義見
references/input-schema.md
</input_schema_summary>
<output_schema_summary>
json
{
  "skill": "analyze-investment-clock-rotation",
  "as_of": "2026-01-19",
  "market": "US_EQUITY",
  "current_state": {
    "clock_hour": 10,
    "quadrant": "Q1_ideal",
    "quadrant_name": "理想象限",
    "x_value": -0.35,
    "y_value": 0.052
  },
  "rotation_summary": {
    "from_hour": 2,
    "to_hour": 10,
    "direction": "clockwise",
    "magnitude_degrees": 240
  },
  "interpretation": "獲利成長為正,金融環境偏支持,屬於風險資產相對順風的象限"
}
完整輸出結構見
templates/output-json.md
。 </output_schema_summary>
<success_criteria> 執行成功時應產出:
  • 當前象限(Q1/Q2/Q3/Q4)
  • 時鐘點位(1-12 點)
  • 獲利成長值與金融環境 Z-score
  • 旋轉方向(順時針/逆時針)
  • 旋轉幅度(度數)
  • 配置建議(依象限)
  • 循環比較摘要(若有啟用)
  • 視覺化圖表(可選,輸出至
    output/
    目錄) </success_criteria>
<essential_principles>
<principle name="quadrant_model"> **Core of the Four-Quadrant Model**
The Investment Clock simplifies market conditions into four quadrants:
          Supportive Financial Conditions (Loose)
       Q3      │      Q1
     Recovery Transition │   Ideal Quadrant
  ────────────┼────────────→ Profit Growth
       Q4      │      Q2
     Worst Quadrant │   Mixed Prospects
          Unsupportive Financial Conditions (Tight)
QuadrantProfitFinancial ConditionsImplicationAllocation Recommendation
Q1 Ideal QuadrantSupportive ↑Risk Asset FriendlyOverweight, Tailwind Allocation
Q2 Mixed ProspectsUnsupportive ↓Valuation Pressure, VolatilityVolatility Management, Valuation Sensitivity
Q3 Recovery TransitionSupportive ↑Loose Policy Rescue, Fundamentals UnrecoveredDo Not Misjudge as a Full Bull Market
Q4 Worst QuadrantUnsupportive ↓Risk Assets VulnerableRisk Control, Deleveraging
</principle> <principle name="axis_convention"> **Axis Convention (Important!)**
Investment Clock diagrams from different sources may have different axis definitions. This skill defaults to:
  • X-axis: Financial Conditions
    • Left = Loose (Highly Supportive)
    • Right = Tight (Low Support)
  • Y-axis: Earnings Growth
    • Top = Positive Growth
    • Bottom = Negative Growth
If your diagram uses a different definition, adjust
axis_mapping
and
clock_convention
in the input parameters. </principle>
<principle name="clock_hour"> **Clock Position Calculation**
Calculate the angle using
atan2(y, x)
, then convert to a 12-hour format:
  • 12 o'clock: Top (Highest Profit, Neutral Financial Conditions)
  • 3 o'clock: Right (Tightest Financial Conditions)
  • 6 o'clock: Bottom (Lowest Profit)
  • 9 o'clock: Left (Loosest Financial Conditions)
Rotation Direction:
  • Clockwise: Typical Business Cycle Path (Q1 → Q2 → Q4 → Q3 → Q1)
  • Counterclockwise: Policy Intervention or Atypical Events </principle>
<principle name="data_access"> **Data Acquisition Methods**
This skill uses data sources that do not require an API key:
  • FRED CSV:
    https://fred.stlouisfed.org/graph/fredgraph.csv?id={SERIES_ID}
    • Financial Conditions: NFCI (Chicago Fed), STLFSI4 (St. Louis Fed)
    • Profit Proxies: CP (Corporate Profits), GDP-related Indicators
Scripts are located in the
scripts/
directory and can be executed directly. </principle>
</essential_principles>
<objective> Implement Investment Clock Analysis:
  1. Construct Coordinates: Calculate Z-scores for Earnings Growth and Financial Conditions from FRED data
  2. Determine Quadrant: Identify the current quadrant
  3. Calculate Position: Convert to 12-hour clock position
  4. Analyze Rotation: Determine rotation direction and magnitude
  5. Cycle Comparison: Compare with the previous cycle (Optional)
Output: Current Quadrant, Clock Position, Rotation Summary, Allocation Recommendation. </objective>
<quick_start>
Fastest Way: Run the Default Analysis
bash
cd skills/analyze-investment-clock-rotation
pip install pandas numpy requests  # First-time use
python scripts/investment_clock.py --quick
Sample Output:
json
{
  "as_of": "2026-01-15",
  "current_position": {
    "clock_hour": 10,
    "quadrant": "Q1_ideal",
    "earnings_growth": 0.052,
    "financial_conditions_zscore": -0.35
  },
  "interpretation": "Ideal Quadrant, Risk Assets in a Relative Tailwind"
}
Full Analysis:
bash
python scripts/investment_clock.py \
  --start 2022-01-01 \
  --end 2026-01-19 \
  --compare-cycle 2020-01-01 2022-12-31 \
  --output result.json
</quick_start>
<intake> What operation do you need to perform?
  1. Quick Check - View the current Investment Clock position and quadrant
  2. Full Analysis - Analyze rotation path and direction within a time interval
  3. Cycle Comparison - Compare rotation characteristics with the previous cycle
  4. Visualization Chart - Generate Investment Clock visualization chart
  5. Methodology Learning - Understand the logic of the Investment Clock model
Please select or provide analysis parameters directly. </intake>
<routing> | Response | Action | |--------------------------------|----------------------------------------------------| | 1, "快速", "quick", "check" | Execute `python scripts/investment_clock.py --quick` | | 2, "完整", "分析", "full" | Read `workflows/analyze.md` and execute | | 3, "比較", "循環", "compare" | Read `workflows/compare-cycle.md` and execute | | 4, "視覺化", "chart", "plot" | Read `workflows/visualize.md` and execute | | 5, "學習", "方法論", "why" | Read `references/methodology.md` | | Provide parameters (e.g., date range) | Read `workflows/analyze.md` and execute with parameters |
After routing, read the corresponding file and execute. </routing>
<directory_structure>
analyze-investment-clock-rotation/
├── SKILL.md                           # This file (Router)
├── skill.yaml                         # Frontend Display Metadata
├── manifest.json                      # Skill Metadata
├── workflows/
│   ├── analyze.md                     # Full Analysis Workflow
│   ├── compare-cycle.md               # Cycle Comparison Workflow
│   └── visualize.md                   # Visualization Workflow
├── references/
│   ├── methodology.md                 # Investment Clock Methodology
│   ├── data-sources.md                # FRED Series Codes and Data Sources
│   └── input-schema.md                # Complete Input Parameter Definitions
├── templates/
│   ├── output-json.md                 # JSON Output Template
│   └── output-markdown.md             # Markdown Report Template
└── scripts/
    ├── investment_clock.py            # Main Analysis Script
    ├── fetch_data.py                  # Data Fetching Tool
    └── visualize.py                   # Visualization Plotting Tool
</directory_structure>
<reference_index>
Methodology: references/methodology.md
  • Investment Clock Concepts and History
  • Four-Quadrant Definitions and Allocation Implications
  • Rotation Direction Interpretation
Data Sources: references/data-sources.md
  • FRED Series Codes (Financial Conditions/Profit Proxies)
  • Data Frequency and Alignment Methods
Input Parameters: references/input-schema.md
  • Complete Parameter Definitions
  • Default Values and Recommended Ranges
</reference_index>
<workflows_index>
WorkflowPurposeUsage Scenario
analyze.mdFull AnalysisRequires detailed quadrant and rotation analysis
compare-cycle.mdCycle ComparisonCompare characteristics of different cycles
visualize.mdGenerate Visualization ChartNeeds chart display
</workflows_index>
<templates_index>
TemplatePurpose
output-json.mdJSON Output Structure Definition
output-markdown.mdMarkdown Report Template
</templates_index>
<scripts_index>
ScriptCommandPurpose
investment_clock.py
--quick
Quickly check current position
investment_clock.py
--start DATE --end DATE
Full Analysis
investment_clock.py
--compare-cycle START END
Cycle Comparison
fetch_data.py
--series NFCI,CP
Fetch FRED Data
visualize.py
-i result.json -o chart.png
Generate Visualization Chart
</scripts_index>
<input_schema_summary>
Core Parameters
ParameterTypeDefault ValueDescription
marketstringUS_EQUITYAnalysis Target
start_datestring2022-01-01Analysis Start Date
end_datestringtodayAnalysis End Date
freqstringweeklyFrequency (weekly/monthly)
Data Source Parameters
ParameterTypeDescription
earnings_series.sourcestringfred / api / csv / manual
earnings_series.series_idstringFRED Series ID (e.g., CP)
earnings_series.growth_methodstringyoy / qoq_annualized
financial_conditions_series.sourcestringfred / api / csv
financial_conditions_series.series_idstringNFCI / STLFSI4
financial_conditions_series.transformstringlevel / zscore / inverse
Axis Parameters
ParameterTypeDefault ValueDescription
axis_mapping.xstringfinancial_conditionsX-axis Definition
axis_mapping.ystringearnings_growthY-axis Definition
clock_convention.financial_loose_is_leftbooltrueLoose Conditions on Left
Complete parameter definitions can be found in
references/input-schema.md
.
</input_schema_summary>
<output_schema_summary>
json
{
  "skill": "analyze-investment-clock-rotation",
  "as_of": "2026-01-19",
  "market": "US_EQUITY",
  "current_state": {
    "clock_hour": 10,
    "quadrant": "Q1_ideal",
    "quadrant_name": "Ideal Quadrant",
    "x_value": -0.35,
    "y_value": 0.052
  },
  "rotation_summary": {
    "from_hour": 2,
    "to_hour": 10,
    "direction": "clockwise",
    "magnitude_degrees": 240
  },
  "interpretation": "Earnings growth is positive, financial conditions are relatively supportive, belonging to a quadrant favorable for risk assets"
}
Complete output structure can be found in
templates/output-json.md
. </output_schema_summary>
<success_criteria> Successful execution should produce:
  • Current Quadrant (Q1/Q2/Q3/Q4)
  • Clock Position (1-12 o'clock)
  • Earnings Growth Value and Financial Conditions Z-score
  • Rotation Direction (Clockwise/Counterclockwise)
  • Rotation Magnitude (Degrees)
  • Allocation Recommendation (Based on Quadrant)
  • Cycle Comparison Summary (If Enabled)
  • Visualization Chart (Optional, Output to
    output/
    Directory) </success_criteria>