compute-precious-miner-gross-margin

Community

Estimate precious-metal miner margins fast.

Authorfatfingererr
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill calculates a simple, comparable gross margin proxy for precious metal miners using publicly available metal prices and cost data, enabling rapid margin assessment and historical regime detection.

Core Features & Use Cases

  • Data integration: pulls metal price data, cost indicators (AISC/Cash Cost), and production figures to compute per-miner margin proxies.
  • Basket aggregation: supports production-weighted, equal-weight, and market-cap-weighted basket margins across gold and silver miners.
  • Historical analysis: computes rolling percentile ranks to identify high/low-margin regimes and driver attribution (price vs cost).
  • Use Case: a researcher can compare current margin proxy against historical distribution for gold or silver miners and generate research signals.

Quick Start

Quick-start commands:

  • Run quick analysis for gold with default basket: python scripts/margin_calculator.py --quick --metal gold
  • Produce a markdown report: python scripts/margin_calculator.py --output results.md --format markdown

Dependency Matrix

Required Modules

pandas>=1.5.0numpy>=1.20.0requests>=2.28.0yfinance>=0.2.0beautifulsoup4>=4.11.0lxml>=4.9.0

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: compute-precious-miner-gross-margin
Download link: https://github.com/fatfingererr/macro-skills/archive/main.zip#compute-precious-miner-gross-margin

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.