一键导入
marketwatch
Scraper de MarketWatch: quotes, financials (income/balance/cash flow), SEC filings, analyst estimates, options chain, historical OHLCV. Sin API key.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scraper de MarketWatch: quotes, financials (income/balance/cash flow), SEC filings, analyst estimates, options chain, historical OHLCV. Sin API key.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
History of Market (historyofmarket.com) — API publica con 88 datasets historicos de indices US desde 1871. S&P 500 (price, CAPE, EPS, drawdowns, changes, constituents), Nasdaq Composite/Nasdaq 100 (price, volatility, VXN, changes), Dow Jones, SOX/SMH, sector ETFs (XLK, XLF), Magnificent 7 y macro. Sin API key, CORS libre, CC BY 4.0.
API no oficial de Yahoo Finance: precios, históricos, fundamentales, opciones, noticias en JSON puro sin wrappers.
Construcción y optimización cuantitativa de portafolios: Markowitz (scipy.optimize + Monte Carlo), Black-Litterman (prior CAPM, views absolutas/relativas, posterior bayesiano), HRP/HERC/NCO (clustering jerárquico, risk parity, NCO con restricciones). Todo flat numpy + scipy, sin Riskfolio-Lib ni PyPortfolioOpt.
Trading API de Primary (Matba ROFEX): futuros, opciones, acciones, bonos. Órdenes, posiciones, cuenta, market data.
Academic backtesting framework for quantitative research. ~30 risk and performance ratios, 10 classes of indicators, event-driven engine with 6+ strategies, MPT optimizer, forward-looking simulation with Johnson SU + t-Copula, walk-forward CV, stress testing, fundamental analysis (Altman Z, Piotroski, DuPont). All flat Python + numpy.
Pricing completo de opciones europeas y americanas. 9 metodos: Black-Scholes, Binomial CRR, Trinomial, Monte Carlo (antithetic) + Longstaff-Schwartz, Bjerksund-Stensland 2002 / BAW (American closed-form), Heston 1993 (vol estocastica, sonrisa via Fourier), Bates 1996 (Heston + Merton jumps, crash risk), greeks (BS), implied vol, P(ITM) y P(Profit). Disenado para backtesting: cada funcion es flat Python vectorizado con numpy (sin abstracciones), usa math.erfc (no scipy). BS 2.4 us/op, BS2 3.6 us, Heston 400 us, Binomial N=500 5.6 ms. CLI con 15 modos mas validate y bench. Time complexity O(1) para todos los closed-form.
| name | marketwatch |
| description | Scraper de MarketWatch: quotes, financials (income/balance/cash flow), SEC filings, analyst estimates, options chain, historical OHLCV. Sin API key. |
| license | MIT |
Scraper de MarketWatch que extrae quotes en tiempo real, financial statements (income, balance sheet, cash flow), SEC filings, analyst estimates, options chain y historical prices para acciones US y ADRs globales.
No requiere API key. Los datos se extraen del HTML de las páginas públicas.
pip install requests beautifulsoup4
| Script | Descripción |
|---|---|
| fetch_marketwatch.py | Script principal: todos los endpoints |
# Quote + perfil de compañía
python scripts/fetch_marketwatch.py --ticker AAPL --quote --profile
# Income statement anual (por defecto)
python scripts/fetch_marketwatch.py --ticker MSFT --income
# Income statement trimestral
python scripts/fetch_marketwatch.py --ticker AAPL --income --quarterly
# Balance sheet + cash flow trimestral
python scripts/fetch_marketwatch.py --ticker NVDA --balance --cashflow --quarterly
# Todos los financials (income + balance + cashflow)
python scripts/fetch_marketwatch.py --ticker AAPL --financials
# SEC filings (10-K, 10-Q, 8-K)
python scripts/fetch_marketwatch.py --ticker AAPL --sec-filings
# Analyst estimates + target price
python scripts/fetch_marketwatch.py --ticker AAPL --analyst
# Options chain
python scripts/fetch_marketwatch.py --ticker AAPL --options
# Historical OHLCV
python scripts/fetch_marketwatch.py --ticker AAPL --historical
# Todo lo disponible
python scripts/fetch_marketwatch.py --ticker GGAL --all
# A JSON
python scripts/fetch_marketwatch.py --ticker AAPL --all --output aapl.json
# Control de rate limiting
python scripts/fetch_marketwatch.py --ticker AAPL --quote --delay 5
| Flag | Data | Frecuencia | Períodos |
|---|---|---|---|
--quote | Precio, cambio, performance (5d, 1m, YTD) | Tiempo real | 1 snapshot |
--profile | Ratios clave, sector, industria, empleados | Actual | 1 snapshot |
--income | Income Statement | Anual / Trimestral | ~5 años |
--balance | Balance Sheet | Anual / Trimestral | ~5 años |
--cashflow | Cash Flow Statement | Anual / Trimestral | ~5 años |
--financials | Income + Balance + Cash Flow (atajo) | Según --quarterly | ~5 años |
--sec-filings | SEC filings (10-K, 10-Q, 8-K) | Histórico | ~20+ entradas |
--analyst | Estimaciones, target price, recomendaciones | Trimestral/anual | ~15+ campos |
--options | Options chain (calls/puts por strike) | Fechas de expiración | Todas disponibles |
--historical | OHLCV histórico diario | Diario | ~1-3 meses |
--all | Todos los anteriores | Según --quarterly | - |
Precio actual, cambio ($), cambio (%), Close anterior, y tabla de performance (5 Day, 1 Month, 3 Month, YTD, 1 Year).
Hasta 29 ratios financieros incluyendo: P/E Current, P/E Ratio, EPS, Market Cap, Shares Outstanding, Revenue/Employee, Employees, Dividend Yield, Beta, etc.
Cada statement contiene ~40-60 items (Revenue, COGS, Gross Profit, Operating Income, Net Income, EBITDA, EPS, etc. para income; Cash, Receivables, Total Assets, Debt, Equity, etc. para balance sheet; Operating Cash Flow, Free Cash Flow, Capex, etc. para cash flow).
Listado de filings con: Filing Date, Document Date, Type (10-K, 10-Q, 8-K), Category.
Average Recommendation, Average Target Price, Number of Ratings, High/Median/Low target, Current/Next Year Estimates, y tabla de cambios de rating por firma.
Options chain organizada por fecha de expiración con calls y puts, strikes, precios, volumen, open interest.
OHLCV diario con Date, Open, High, Low, Close, Volume (últimos ~60 días).
MarketWatch usa Datadome para protegerse de scraping automatizado.
| Situación | Síntoma | Solución |
|---|---|---|
| Muchos requests seguidos | 401 Unauthorized | Aumentar --delay (mín 3s, ideal 5s) |
| IP bloqueada temporalmente | 401 incluso con delay | Esperar 5-10 minutos |
| Headers incorrectos | 401 inmediato | Usar headers de navegador (ya incluidos) |
| Sin session cookies | 401 | El scraper maneja cookies automáticamente |
Recomendación: No más de 4-5 endpoints por ticker por ejecución.
skills/marketwatch/
├── SKILL.md # Este archivo
├── references/
│ └── REFERENCE.md # Documentación completa de todos los endpoints
└── scripts/
└── fetch_marketwatch.py # Script principal
📖 Referencia completa: Para entender en detalle cada endpoint, columnas de options, campos de financials, estructura de historical data, etc., consultá references/REFERENCE.md.