SuperAPI AI Directory

analyze-rolex-market-index-liquidity-proxy

Data & analytics

View repository

Updated 10-16 06:17

About this skill

<essential_principles> Analyze the degree of liquidity speculation using the Rolex Index Core Principles

Net liquidity rising → actual available funds in the financial system increase → risk assets and the Rolex secondary market benefit

Using the Rolex Market Index as the core, compare it against Fed net liquidity and real interest rates to complete the following judgments:

  1. Confirm parameters: time range, frequency, liquidity model
  2. Retrieve data: retrieve liquidity and interest rate data from FRED, and scrape the Rolex Market Index via CDP
  3. Calculate indicators: z-score, rolling slope, rolling β, distance from peak
  4. Interpret state: grinding_higher (slowly grinding higher) or speculative_fever (speculative fever)
  5. Produce report: structured JSON + Markdown summary
  6. Provide recommendations: next-step monitoring priorities and cross-validation directions

<quick_start> Quick start

# 1. 安裝依賴
pip install pandas numpy requests websocket-client matplotlib

# 2. 啟動 Chrome 調試模式並開啟 WatchCharts 頁面
#    Windows:
#      "C:\Program Files\Google\Chrome\Application\chrome.exe" ^
#        --remote-debugging-port=9222 ^
#        --remote-allow-origins=* ^
#        --user-data-dir="%USERPROFILE%\.chrome-debug-profile" ^
#        "https://watchcharts.com/watches/brand_index/rolex"
#
#    macOS:
#      /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
#        --remote-debugging-port=9222 \
#        --remote-allow-origins=* \
#        --user-data-dir="$HOME/.chrome-debug-profile" \
#        "https://watchcharts.com/watches/brand_index/rolex"

# 3. 等待頁面完全載入(圖表顯示),然後執行分析
python scripts/rolex_market_index_analyzer.py \
  --start-date 2019-01-01 \
  --end-date 2026-01-29 \
  --freq W \
  --liquidity-model fed_net_liquidity \
  --cdp-port 9222 \
  --output result.json

</quick_start>

  1. Full analysis - Complete process from data retrieval to state interpretation (recommended)
  2. Retrieve data only - Only retrieve FRED data and scrape the Rolex Market Index via CDP
  3. Calculate indicators only - Assume data is ready and directly calculate all indicators
  4. Interpret state only - Assume indicators have been calculated and interpret the grinding/fever state

Wait for a response before continuing.

After reading the workflow, please follow its steps completely.

<directory_structure>

skills/analyze-rolex-market-index-liquidity-proxy/
├── SKILL.md                          # 本檔案(路由與核心原則)
├── skill.yaml                        # 前端展示設定
├── manifest.json                     # 技能元資料
├── workflows/
│   └── analyze.md                    # 主要分析工作流(6 步驟)
├── references/
│   ├── methodology.md                # 方法論(公式、規則、判讀邏輯)
│   ├── input-schema.md               # 輸入參數定義
│   └── data-sources.md               # 數據來源文檔
├── templates/
│   ├── output-json.md                # JSON 輸出模板
│   └── output-markdown.md            # Markdown 報告模板
├── scripts/
│   ├── fetch_rolex_index.py           # CDP 爬蟲(WatchCharts Rolex Index)
│   ├── rolex_market_index_analyzer.py # 主要分析腳本
│   └── rolex_market_index_plotter.py  # 視覺化腳本(選配)
└── examples/
    └── sample-output.json            # 範例輸出

</directory_structure>

<reference_index> Reference documents (references/)

Document Content
methodology.md Methodology: z-score, rolling slope, rolling β, grinding/fever interpretation rules
input-schema.md Definitions, types, default values, and optional values of all input parameters
data-sources.md FRED series codes, WatchCharts CDP scraping, fallback plan
</reference_index>

<workflows_index>

Workflow Purpose
analyze.md Complete analysis process (6 steps: confirm parameters → retrieve data → calculate indicators → interpret state → produce report → recommendations)
</workflows_index>

<templates_index>

Template Purpose
output-json.md Structured JSON output template (including summary, metrics, signals, diagnostics)
output-markdown.md Markdown report template (including TL;DR, basis, risks, next steps)
</templates_index>

<scripts_index>

Script Purpose
fetch_rolex_index.py CDP scraper: automatically scrape the Rolex Market Index from WatchCharts
rolex_market_index_analyzer.py Main analysis script: FRED data retrieval, CDP scraping, indicator calculation, state interpretation
rolex_market_index_plotter.py Visualization script: dual-axis chart (Rolex Market Index vs net liquidity), z-score heatmap

Execution example:

# 完整分析(需先啟動 Chrome 調試模式並開啟 WatchCharts 頁面)
python scripts/rolex_market_index_analyzer.py \
  --start-date 2019-01-01 \
  --end-date 2026-01-29 \
  --freq W \
  --liquidity-model fed_net_liquidity \
  --cdp-port 9222 \
  --output result.json

# 視覺化(選配)
python scripts/rolex_market_index_plotter.py \
  --input result.json \
  --output-dir output/

</scripts_index>

<input_schema_summary> Input parameter summary

Parameter Type Required Default value Description
start_date string ✅ - Analysis start date (YYYY-MM-DD)
end_date string ✅ - Analysis end date (YYYY-MM-DD)
frequency string ❌ "W" Frequency: D/W/M
liquidity_scope string ❌ "US" US or GLOBAL
include_real_yield boolean ❌ true Whether to include DFII10
real_yield_series string ❌ "DFII10" FRED real interest rate code
liquidity_model string ❌ "fed_net_liquidity" Liquidity model
benchmark_assets array ❌ [] Reference asset code
fever_threshold_z number ❌ 2.0 Speculative fever z-score threshold
grind_window int ❌ 13 Slope/moving average rolling window

For complete definitions, see references/input-schema.md。 </input_schema_summary>

<output_schema_summary> Output structure summary

{
  "skill": "analyze_veblen_goods_liquidity_proxy",
  "inputs": { "..." },
  "summary": {
    "state": "grinding_higher | speculative_fever | neutral | declining",
    "interpretation": ["..."]
  },
  "metrics": {
    "latest_index": 28400,
    "pct_below_peak": -0.33,
    "grind_slope": 12.4,
    "rolex_zscore": 0.6,
    "dfii10_level": 1.9,
    "net_liquidity_change": 2.1e10,
    "rolling_beta_vs_net_liquidity": 1.8
  },
  "signals": {
    "grinding_higher": true,
    "speculative_fever": false
  },
  "diagnostics": { "..." }
}

For the full template, see templates/output-json.md。 </output_schema_summary>

<success_criteria> When the Skill executes successfully:

  • FRED data (DFII10, WALCL, RRPONTSYD, WTREGEN) retrieved successfully
  • WatchCharts Rolex Market Index CDP automatically scraped successfully with missing-value ratio < 5%
  • All frequency alignment completed (resample + forward-fill)
  • z-score, rolling slope, and rolling β calculations completed
  • grinding_higher / speculative_fever state assessment completed
  • JSON output includes summary, metrics, signals, diagnostics
  • Markdown report includes TL;DR, rationale, risks, next steps
  • Percentage below peak (pct_below_peak) correctly reflects the current position </success_criteria>