factor-research
Qué hace
Esta skill evalúa factores bursátiles en un grupo de instrumentos y comprueba cuáles tienen poder predictivo real. Está pensada para analistas cuantitativos que quieren filtrar factores y combinar los buenos.
Cuándo usarla
- ✓Cuando quieres comprobar si un solo factor, como el momentum o el valor, predice rendimientos.
- ✓Cuando quieres elegir pesos para combinar varios factores.
- ✓Cuando quieres ver con qué rapidez se desvanece el poder predictivo de un factor en distintos periodos de tenencia.
Link de la skill
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/factor-research/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Comprueba si los factores de momentum y de valor predicen rendimientos en esta lista de acciones, y dime cuál merece combinarse.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente calcula los valores de cada factor y los rendimientos futuros de cada acción, y luego ejecuta la herramienta de análisis de factores para calcular las estadísticas IC e IR y los backtests por cuantiles. Juzga la validez de cada factor con estos resultados y sugiere cómo combinar los fuertes.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Factor Research Framework
Purpose
Systematically evaluates the predictive power of single or multiple factors. Uses IC/IR statistical tests and quantile backtests to determine whether a factor has stock-selection power, and to guide factor screening and combination.
Applicable scenarios:
- Single-factor validity testing (momentum, value, quality, volatility, and more)
- Determining weights for multi-factor combination
- Factor decay analysis (IC changes across different holding periods)
- Comparing factor differences across industries and markets
Workflow
- Calculate factor values: compute factor exposures for each instrument on the cross-section, and output a factor CSV (
index=date,columns=codes) - Calculate returns: compute each instrument's forward N-day return, and output a return CSV (same structure)
- Call the
factor_analysistool: pass in the factor CSV, return CSV, and output directory - Interpret the results: judge factor validity based on IC/IR criteria and quantile backtest results
- Factor screening / combination: keep effective factors and combine them with equal weights or IC-based weights
Key point: the rows (dates) and columns (instrument codes) of the factor CSV and return CSV must align exactly. Returns must be forward returns after the factor-observation date (to avoid look-ahead bias).
factor_analysis Tool Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| factor_csv | string | Yes | - | Path to the factor-value CSV |
| return_csv | string | Yes | - | Path to the return CSV |
| output_dir | string | Yes | - | Output directory for results |
| n_groups | integer | No | 5 | Number of quantile groups |
Output Files
| File | Contents |
|---|---|
| ic_series.csv | Daily IC series |
| ic_summary.json | IC mean, IC standard deviation, IR, proportion of IC > 0 |
| group_equity.csv | Cumulative equity curves for each quantile group |
IC/IR Interpretation Standards
| Metric | Threshold | Interpretation |
|---|---|---|
| IC mean | > 0.03 | Factor has basic predictive power |
| IC mean | > 0.05 | Factor has strong predictive power |
| IC mean | > 0.10 | Unusually high; check for look-ahead bias |
| IR (IC mean / IC std) | > 0.5 | Factor is stably effective |
| IR | > 1.0 | Extremely strong, very rare |
| Proportion of IC > 0 | > 55% | Factor direction is stable |
| Proportion of IC > 0 | < 50% | Factor direction is unstable and unusable |
Note: negative IC can also be useful (reverse factors). Judge by absolute value, and reverse the signal direction in actual use.
Quantile Backtest Interpretation
Quantile backtesting sorts instruments into N groups by factor value from low to high (default 5 groups), with equal-weight holding inside each group.
Criteria:
- Monotonicity: the final net values from
Group_1toGroup_Nshould show a monotonic rising (or falling) pattern. Better monotonicity means stronger factor discrimination - Long-short spread: the net-value difference between the highest and lowest group (
long_short_spread). A larger spread means stronger selection power - Nonlinearity: if only the top and bottom groups differ materially while the middle groups are similar, the factor may only be effective in the tails
- Stability: group equity curves should be smooth; sharp swings indicate an unstable factor
Warning signs:
- No meaningful difference across group equity curves → the factor is ineffective
- Non-monotonic pattern (such as V-shape or inverted V-shape) → the factor may have a nonlinear relationship and requires further analysis
- One group's net value falls persistently → the factor may be usable in reverse
Factor Combination Methods
When multiple single factors pass validity tests, they should be combined into a composite factor:
Equal-Weight Combination
The simplest method: standardize each factor and sum them with equal weights. Suitable when the factor count is small and IC differences are minor.
Composite factor = Z(factor1) + Z(factor2) + ... + Z(factorN)
where Z() is cross-sectional Z-score standardization
IC-Weighted Combination
Assign weights according to historical IC mean. Factors with higher IC receive larger weights.
weight_i = |IC_mean_i| / sum(|IC_mean_j|)
Composite factor = sum(weight_i * Z(factor_i))
Orthogonalized Combination
First orthogonalize the factors with the Schm
Preguntas frecuentes
¿Qué mide el IC?
Lo bien que el ranking de acciones de un factor coincide con el ranking de sus rendimientos posteriores.
¿Por qué los rendimientos deben ser futuros?
Usar rendimientos anteriores a la fecha del factor sería un sesgo de anticipación y haría la prueba poco fiable.
¿Se pueden combinar factores?
Sí. La skill cubre la ponderación igual y la ponderación basada en el IC para combinar factores eficaces.
Detalles
Descripción original del autor
Factor research framework with IC/IR analysis, quantile backtesting, and factor combination. Suitable for cross-sectional factor evaluation across multiple instruments.
repo: HKUDS/Vibe-Trading
Popularidad
- Estrellas en GitHub
- 37 mil
- Posición en el ranking
- #7519
- Licencia
- MIT
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
vibe-trading
37 milDa a tu agente un kit completo de investigación financiera, con backtests, análisis de factores, precios de opciones y datos de mercado de muchos mercados.
adr-hshare
37 milMuestra a tu agente cómo comparar el precio de una empresa china que cotiza en varios mercados, como un ADR estadounidense y una acción de Hong Kong.
akshare
37 milPermite a tu agente obtener datos de mercado gratuitos de acciones chinas y globales, futuros, divisas e indicadores económicos, sin necesidad de clave de API.
alpha-zoo
37 milPermite a tu agente explorar una biblioteca de factores bursátiles ya hechos y probar qué tan bien predice el rendimiento un conjunto completo de ellos en un mercado elegido.
Skills parecidas
gitcrawl
394 milPermite que tu agente busque en un archivo guardado de incidencias y pull requests de GitHub, agrupe duplicados y revise su estado actual en GitHub.
slacrawl
394 milPermite que tu agente busque y cuente mensajes en un archivo local de Slack, revise qué tan reciente es y lo actualice cuando haga falta.
goplaces
394 milAyuda a tu agente a buscar lugares, obtener sus detalles y reseñas, y resolver nombres de lugares usando Google Places, con salida JSON para scripts.