analyze-silver-miner-metal-ratio

Compute silver miner-to-metal ratios with Python and pandas.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a framework to analyze the relative valuation of silver miners versus silver price by computing and evaluating the miner-to-metal ratio, determining historical positioning, detecting divergence signals, and performing forward-looking scenario analysis.

Core Features & Use Cases

  • Ratio construction: compute miner_price / metal_price and apply optional smoothing to reveal trend signals.
  • Historical analysis: compute percentile ranks and identify bottom/top zones using historical distributions.
  • Scenario planning: quantify how much miners would need to rise or silver would need to fall to return to a top valuation, under various assumptions.
  • Use Case: a research analyst wants to validate a claim that "silver miners are near a bottom," and simulate forward performance after bottom signals.

Quick Start

  • Run a quick analysis with default proxies SIL / SI=F:
    • python scripts/ratio_analyzer.py --quick
  • Generate a basic visualization:
    • python scripts/ratio_plotter.py --quick --output-dir ../../output
  • For a full report with historical analogs and forward returns:
    • python scripts/ratio_analyzer.py --start-date 2010-01-01 --forward-horizons 52,104,156 --output result.json

Frequently Asked Questions about analyze-silver-miner-metal-ratio

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

FAQPage Schema
How do I analyze the silver miner to metal ratio for relative valuation?

You can perform silver miner relative valuation by computing the miner-to-metal ratio using yfinance proxies like SIL and SI=F. The analysis calculates percentile ranks to identify bottom or top zones and applies optional smoothing to reveal trend signals.

What is the best way to test if silver miners are near a valuation bottom?

The best way to test for a silver miner valuation bottom is by computing percentile ranks of the miner-to-metal ratio against historical distributions. You can then simulate forward performance after bottom signals using customized forward horizons like 52, 104, or 156 weeks.

Can I use yfinance data to run scenario analysis on silver mining stocks?

Yes, you can use yfinance to run scenario analysis on silver mining stocks by fetching historical proxies. The framework quantifies how much miners must rise or silver must fall to reach top valuations, supporting weekly and monthly data intervals.

How do I generate forward-looking signals for silver miners using Python?

You generate forward-looking signals for silver miners using Python with pandas and numpy to evaluate historical analogs and forward returns. Specifying custom forward horizons and start dates projects future performance scenarios based on historical ratio patterns.

Does the silver miner ratio analysis require scipy and matplotlib?

The silver miner ratio analysis requires Python with pandas, numpy, and yfinance for core ratio computations and scenario analysis. Scipy and matplotlib are optional dependencies used specifically for generating visual plots and applying advanced statistical smoothing.

What are the limitations of using SIL and SI=F proxies for miner-to-metal ratio analysis?

Using SIL and SI=F proxies for miner-to-metal ratio analysis limits you to the historical data ranges available through yfinance. While it supports customizable start dates and weekly or monthly intervals, scenario planning and divergence detection depend on these specific proxy assets.