analyze-copper-inventory-rebuild-signal

Analyze SHFE inventory rebound speed and COMEX levels to identify copper price turning points.

3|1|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/fatfingererr/macro-skills --skill analyze-copper-inventory-rebuild-signal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analyze-copper-inventory-rebuild-signal
Source: https://github.com/fatfingererr/macro-skills/tree/main/skills/analyze-copper-inventory-rebuild-signal
Command: npx skills add https://github.com/fatfingererr/macro-skills --skill analyze-copper-inventory-rebuild-signal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, requests, websocket-client, yfinance, matplotlib, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill analyzes SHFE inventory rebound speed and COMEX inventory levels to generate short-term copper signals while providing a long-term price percentile view, helping traders evaluate risk and timing.

Core Features & Use Cases

  • Dual-source signal framework: combines SHFE rebound z-scores with COMEX validation to generate near-term signals.
  • Long-term valuation view: computes 10-year price percentile to assess whether copper is cheap, fair, or rich.
  • Automated data pipeline: fetches SHFE/COMEX stocks via MacroMicro CDP and copper futures via Yahoo Finance, caches data, and outputs markdown/JSON reports.
  • Use Case: A trader runs weekly checks to decide if market is read for caution or potential upside.

Quick Start

  • Install Python 3.9+ and required packages: pandas, numpy, requests, websocket-client, yfinance, matplotlib.
  • Run data fetch: cd skills/analyze-copper-inventory-rebuild-signal/scripts; python fetch_copper_data.py.
  • Run quick analysis: python inventory_signal_analyzer.py --quick.
  • Generate visualization: python visualize_inventory_signal.py.
  • Review outputs in the output/ directory and cache/.

Frequently Asked Questions about analyze-copper-inventory-rebuild-signal

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze copper inventory rebuild signals using SHFE and COMEX data?

Copper price turning points are identified by combining SHFE inventory rebound z-scores with COMEX inventory levels, creating a dual-stock signal that flags short-term caution when inventory rebuilds rapidly while prices sit at high historical percentiles.

How do I fetch SHFE and COMEX copper inventory data with Python for z-score analysis?

You can fetch SHFE and COMEX copper inventory data by running the fetch_copper_data.py Python script, which connects to the MacroMicro CDP API and Yahoo Finance, caches the results locally, and prepares datasets for z-score computation.

Do I need a specific Python environment to run copper inventory signal analysis?

Yes, running the copper inventory signal analyzer requires Python 3.9+ and installing pandas, numpy, requests, websocket-client, yfinance, and matplotlib to support data fetching, statistical computation, and visualization.

What is the best way to visualize copper inventory z-scores and price percentiles?

The best way to visualize copper inventory signals is by running the visualize_inventory_signal.py script, which uses matplotlib to plot SHFE z-scores, COMEX inventory levels, and 10-year copper price percentiles from cached data.

How does the 10-year price percentile help assess long-term copper valuation?

The 10-year price percentile assesses long-term copper valuation by comparing current copper futures prices against the past decade of data, categorizing the market as cheap, fair, or rich to contextualize short-term inventory signals.

What formats are output by the copper inventory signal analyzer for decision support?

The copper inventory signal analyzer outputs decision support reports in Markdown and JSON formats, containing computed z-scores, price percentiles, and dual-source caution signals saved in the output directory.