mcpField
H
historyofmarket

historyofmarket

github.com/gauss314Data & databases252118 installsUpdated 19w ago
Repository

About historyofmarket

historyofmarket is a skill for financial market researchers and agents that provides access to historical U.S. market datasets through a public API. Its coverage includes indexes, ETFs, valuation measures, drawdowns, and macro series, with scripts for reconstructing historical constituents.

Key features

  1. 01Access 88 pre-generated JSON datasets
  2. 02Cover U.S. indexes, ETFs, and macro data
  3. 03Retrieve CAPE, valuation, and drawdown data
  4. 04Reconstruct index constituents for past dates
  5. 05Run sector rotation analysis scripts

Use cases

  1. 01Study long-term market valuations and returns
  2. 02Analyze historical drawdowns and their causes
  3. 03Reconstruct index constituents on a given date
  4. 04Compare sector returns, correlations, and drawdowns

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/gauss314/skills --skill historyofmarket

After installing, type/historyofmarketin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

assets/
endpoints.json
references/
BROADER_MARKET.md
DRAWDOWN_VOLATILITY.md
MAGNIFICENT7.md
NASDAQ_100_METHODOLOGY.md
SECTOR_ETFS.md
SP500_METHODOLOGY.md
VALUATION_METRICS.md
scripts/
reconstitute_ndx.py
reconstitute_sp500.py
sector_rotation.py

Details

From the project README

History of Market

Skill para acceder a la API publica historyofmarket.com — 88 datasets pre-generados (JSON estatico) sobre la historia de los mercados financieros de EE.UU. desde 1871. Sin API key, sin autenticacion, CORS libre, licencia CC BY 4.0.

Cada dataset es un archivo JSON pre-generado (sin parametros). Cache: max-age=300 con stale-while-revalidate=3600. Soporta ETag.


🎯 Que datos cubre

CategoriaIndices / ETFsDatos disponibles
S&P 500SPXDaily desde 1928, CAPE desde 1871, EPS, drawdowns, volatilidad, VIX, constituents, changes, sectors, forward PE, ROE, driver decomp, return details
Nasdaq CompositeCOMPDaily desde 1971
Nasdaq 100NDXDaily desde 1985, constituents, annual returns, drawdowns, VXN, forward PE, driver decomp, rolling 5y, changes
QQQQQQReturn details (price + dividend + buyback)
Dow JonesDJIADaily desde 1914
Philadelphia SemiSOXDaily desde 1994, 30 constituents, SMH holdings, memory valuation, ratios SOX/SPX, ETF compare
Sector ETFsXLK, XLFPrice, annual returns, drawdowns, volatility, holdings, GICS reclassifications (2018/2023)
Mag 7AAPL/MSFT/NVDA/GOOGL/AMZN/META/TSLAEqual-weighted composite, concentration, correlation, AI valuation, AI capex, lineage
Macro—AIAE (equity allocation), NBER recessions, yield curve, forward PE by sector

⚡ Singularidades de este skill

  1. CAPE (Shiller PE) desde 1871 — el unico skill del repo con PE10 historico. references/VALUATION_METRICS.md

  2. Drawdowns con causa — cada drawdown incluye el evento que lo desencadeno y dias de recuperacion. references/DRAWDOWN_VOLATILITY.md

  3. Driver decomposition — descompone el retorno anual en rerating (cambio de PE) vs revision (cambio de EPS). references/VALUATION_METRICS.md

  4. GICS reclassification — impacto de los cambios de sector GICS 2018 y 2023 en XLK y XLF. references/SECTOR_ETFS.md

  5. Reconstitucion historica — los scripts permiten reconstruir miembros historicos de S&P 500 y Nasdaq 100 a una fecha dada.


🚀 Quick start

# S&P 500 — century closes
curl https://historyofmarket.com/api/sp500/century.json

# Shiller CAPE
curl https://historyofmarket.com/api/sp500/pe.json

# Drawdowns historicos con causa
curl https://historyofmarket.com/api/sp500/drawdowns.json

# Constituyentes actuales S&P 500
curl https://historyofmarket.com/api/sp500/constituents.json

# Cambios historicos S&P 500 (adds/removes)
curl https://historyofmarket.com/api/sp500/changes.json

# Nasdaq 100 constituyentes actuales
curl https://historyofmarket.com/api/nasdaq/100.json

# Mag 7 concentracion en S&P 500
curl https://historyofmarket.com/api/mag7/concentration.json

# NBER recessions
curl https://historyofmarket.com/api/recessions.json

📁 File map

skills/historyofmarket/
├── SKILL.md
├── assets/
│   └── endpoints.json        ← snapshot de todos los 88 endpoints
├── references/
│   ├── SP500_METHODOLOGY.md  ← S&P 500: elegibilidad, earnings test, cambios
│   ├── NASDAQ_100_METHODOLOGY.md
│   ├── DRAWDOWN_VOLATILITY.md
│   ├── VALUATION_METRICS.md  ← CAPE, forward PE, driver decomp, ROE
│   ├── SECTOR_ETFS.md        ← XLK, XLF, GICS reclass, holdings
│   ├── MAGNIFICENT7.md       ← Mag 7, concentration, AI capex, lineage
│   └── BROADER_MARKET.md     ← Dow, SOX, recessions, yield curve
└── scripts/
    ├── reconstitute_sp500.py  ← reconstruir miembros S&P 500 a fecha dada
    ├── reconstitute_ndx.py    ← reconstruir miembros NDX a fecha dada
    └── sector_rotation.py     ← rotacion sectorial XLK vs XLF vs SPY

📚 Referencias

Para entender la teoria detras de los datos:

DocumentoContenido
references/SP500_METHODOLOGY.mdElegibilidad, earnings test, market cap minimo, comite de indices, historial de cambios
references/NASDAQ_100_METHODOLOGY.mdNasdaq 100 methodology, annual reconstitution, weight caps
references/DRAWDOWN_VOLATILITY.mdDrawdowns, intrayear vs year-end, volatilidad realizada, VIX/VXN
references/VALUATION_METRICS.mdShiller CAPE, forward PE, trailing PE, EPS, ROE, driver decomp
references/SECTOR_ETFS.mdSector ETFs XLK/XLF, GICS reclassification 2018/2023, holdings
references/MAGNIFICENT7.mdMag 7 composite, concentration in SPX, correlation, AI capex, lineage
references/BROADER_MARKET.mdDow Jones, SOX/SMH, NBER recessions, yield curve

🐍 Scripts

ScriptPropositoUso
scripts/reconstitute_sp500.pyReconstruir los 500 miembros del S&P 500 en una fecha historicapy scripts/reconstitute_sp500.py 2020-01-01
scripts/reconstitute_ndx.pyReconstruir los 100 miembros del Nasdaq 100 en una fecha historicapy scripts/reconstitute_ndx.py 2020-01-01
scripts/sector_rotation.pyAnalizar rotacion sectorial: rolling returns, correlacion, drawdowns sincronicospy scripts/sector_rotation.py

🌐 Entry points

EndpointDescripcion
/api/_manifest.jsonCatalogo completo de los 88 datasets
/api/profile.jsonPerfil del sitio para AI agents
/api/tools.jsonLista machine-callable de 68 tools
/llms.txtResumen LLM-friendly
/.well-known/llms.txtWell-known location
/ai.txtAI agent instructions
/sitemap.xmlSitemap completo (60+ panels × 6 locales)
/robots.txtRobots.txt

Ver assets/endpoints.json para el snapshot completo de los 88 endpoints con descripcion.

Comments

Markdown supported