detect-us-equity-valuation-percentile-extreme

Community

Radar-style US equity valuations insight.

Authorfatfingererr
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill assesses whether US equity valuations are historically extreme by turning multiple valuation metrics into historical percentiles and aggregating them into a single risk score. It enables users to understand relative valuation strength, track potential earnings compression, and gauge tail risks.

Core Features & Use Cases

  • Convert indicators like CAPE, trailing P/E, forward P/E, P/B, P/S, and market cap to GDP into 0-100 percentiles based on long-run history.
  • Combine metrics via mean, median, or trimmed_mean to produce a robust composite score and flag extreme periods.
  • Identify historical analogs (e.g., 1929, 1965, 1999, 2021) and output post-event statistics for risk assessment and scenario planning.
  • Provide a risk-interpretation framework that communicates that high valuations do not guarantee a crash but imply upper-tail risk and potential returns compression.

Quick Start

  • cd skills/detect-us-equity-valuation-percentile-extreme
  • pip install pandas numpy yfinance requests matplotlib openpyxl xlrd
  • python scripts/visualize_valuation.py -o output
  • python scripts/valuation_percentile.py --quick
  • python scripts/valuation_percentile.py --as_of_date 2026-01-21 --universe "^GSPC" --metrics "cape,mktcap_to_gdp,trailing_pe,pb" --output result.json

Dependency Matrix

Required Modules

pandasnumpyrequestsyfinancematplotlibopenpyxlxlrd

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: detect-us-equity-valuation-percentile-extreme
Download link: https://github.com/fatfingererr/macro-skills/archive/main.zip#detect-us-equity-valuation-percentile-extreme

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.