Factor & Backtest Data
Multi-factor standardized library, cross-sectional ranking, performance evaluation, backtest export, and stock screening.
| Method | Endpoint | Description |
|---|
| GET | /v1/factors/library | Factor library query |
| GET | /v1/factors/ranking | Factor ranking |
| GET | /v1/factors/industries | Industry list |
| GET | /v1/factors/performance | Factor performance (IC/IR) |
| GET | /v1/factors/backtest-data | Backtest data export |
| GET | /v1/stocks/screen | Multi-factor screener |
| GET | /v1/stocks/compare | Multi-stock comparison |
1. Factor Library
| Method | Endpoint |
|---|
| GET | /v1/factors/library |
Query the multi-factor standardized library covering 7 dimensions (value, quality, momentum, capital, risk, expectation, governance) plus a composite score. Each factor is cross-sectionally percentile-normalized (0-100); NULL defaults to neutral 50.
| Parameter | Type | Required | Description |
|---|
symbol | string | - | Stock code (e.g. sz.000001) |
date | string | - | Trade date (YYYY-MM-DD) |
start_date | string | - | Start date |
end_date | string | - | End date |
industry | string | - | Shenwan Level-1 industry filter |
fields | string | - | Comma-separated columns; * for all |
limit | int | - | Max records (default 200, max 1000) |
2. Factor Ranking
| Method | Endpoint |
|---|
| GET | /v1/factors/ranking |
Rank stocks by a single factor score or composite. Supports 27 factor columns, ascending/descending order, and optional industry-neutralization.
| Parameter | Type | Required | Description |
|---|
factor | string | - | Factor column (default composite_score) |
date | string | - | Trade date (defaults to latest) |
industry | string | - | Shenwan industry filter |
top_n | int | - | Number of top stocks (default 50, max 500) |
order | string | - | Sort direction: asc / desc (default desc) |
neutralize | string | - | Set to industry for industry-relative ranking |
3. Industry List
| Method | Endpoint |
|---|
| GET | /v1/factors/industries |
Returns all Shenwan Level-1 industry names present in the factor library, for use with the industry filter parameter of library and ranking.
| Method | Endpoint |
|---|
| GET | /v1/factors/performance |
Computes Rank IC mean, IC information ratio (IC_IR), win rate, and sample size for each factor, based on cross-sectional correlation with fwd_return_20d from the backtest wide table.
| Parameter | Type | Required | Description |
|---|
start_date | string | - | Sample start date |
end_date | string | - | Sample end date |
factor | string | - | Single factor column (omit for all 20) |
Each row returns: factor, mean_ic, ic_ir, win_rate, obs.
5. Backtest Data Export
| Method | Endpoint |
|---|
| GET | /v1/factors/backtest-data |
Export a backtest-ready wide table containing market data, standardized factors, forward returns, and regime labels. Requires Max plan — contains forward-looking returns intended for backtesting only.
| Parameter | Type | Required | Description |
|---|
symbol | string | - | Stock code (optional) |
date | string | - | Exact trade date |
start_date | string | - | Start date |
end_date | string | - | End date |
limit | int | - | Max records (default 500, max 5000) |
6. Multi-Factor Screener
| Method | Endpoint |
|---|
| GET | /v1/stocks/screen |
Screen stocks by factor-score thresholds, industry, and custom 7-dimensional weights. Supports 27 factor columns and JSON-formatted flexible filters.
| Parameter | Type | Required | Description |
|---|
filters | string (JSON) | - | Filter dict; keys are factor aliases, values are [op, threshold]. Example: {"value_score": ["gt", 0.7]} |
industry | string | - | Shenwan industry |
sort | string | - | Sort column (prefix - for descending) |
trade_date | string | - | Trade date (defaults to latest) |
weights | string | - | Custom 7-dim weights: val,qual,mom,cap,risk,exp,gov |
fields | string | - | Return fields; * for all |
limit | int | - | Max results (default 50) |
Supported operators: gt, gte, lt, lte. When weights is provided, a dynamic custom_score column is returned.
7. Multi-Stock Comparison
| Method | Endpoint |
|---|
| GET | /v1/stocks/compare |
Compare factor scores across up to 20 stocks on the same trade date for rapid portfolio evaluation.
| Parameter | Type | Required | Description |
|---|
symbols | string | ✓ | Comma-separated stock codes (e.g. sh.600519,sz.000858) |
date | string | - | Trade date (defaults to latest) |
fields | string | - | Return fields; * for all |