File size: 2,971 Bytes
5ea02d5 a1ab59f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | ---
license: apache-2.0
---
> **Languages:** [简体中文](README_ZH.md) · [English](README.md)
# dojo_sector_precomputed — Precomputed Sector Analytics
## Overview
Derived sector analytics: L3 constituent snapshots, daily cap-weighted sector index levels, and per-constituent daily returns. Built offline from taxonomy, mappings, quotes, and stock K-lines.
## Files
| File | Description |
|------|-------------|
| `manifest.json` | Generation metadata: version, window start, row counts, latest trade dates |
| `constituents.parquet` | L3 constituent snapshot (cap, P/E) |
| `sector_daily.parquet` | Daily sector index and metrics (L1/L2/L3 scope) |
| `ticker_daily.parquet` | Constituent daily close and returns |
## Key Fields
### manifest.json
| Field | Description |
|-------|-------------|
| `version` | Schema version (currently `2`) |
| `generated_at` | UTC generation timestamp |
| `window_start` | Window start (default `2025-01-01`) |
| `latest_trade_date_by_market` | Latest session per market |
| `constituent_count` / `sector_daily_rows` / `ticker_daily_rows` | Row count summary |
### constituents.parquet
| Field | Description |
|-------|-------------|
| `level1_id` / `level2_id` / `level3_id` | Sector path IDs |
| `market` | `us`, `cn`, or `hk` |
| `ticker` | Constituent symbol |
| `role` | `primary` or `secondary` |
| `market_cap` | Snapshot market cap |
| `weighted_pe` | Stock P/E used in sector weighting |
### sector_daily.parquet
| Field | Description |
|-------|-------------|
| `trade_date` | Trade date |
| `scope` | `L1`, `L2`, or `L3` aggregation level |
| `market` | Market |
| `level1_id` / `level2_id` / `level3_id` | Sector IDs |
| `member_count` | Constituent count |
| `total_market_cap` | Aggregate cap |
| `weighted_pe` | Cap-weighted P/E |
| `index_level` | Cap-weighted index (base = 100) |
| `daily_return_pct` | Sector daily return (%) |
### ticker_daily.parquet
| Field | Description |
|-------|-------------|
| `ticker` | Stock symbol |
| `trade_date` | Trade date |
| `close` | Close price |
| `daily_return_pct` | Daily return (%) |
| `cumulative_return_pct` | Cumulative return since `window_start` (%) |
## Scale (reference)
See `manifest.json`. Typical sizes: constituents ~20k, sector_daily ~180k, ticker_daily ~4.6M rows.
## Index Method
- Daily returns are **cap-weighted** across constituents; index base level = 100.
- Constituents require valid daily bars in [dojo_stock_kline](https://huggingface.co/datasets/AlphaDojo/dojo_stock_kline) and positive market cap from [dojo_quote](https://huggingface.co/datasets/AlphaDojo/dojo_quote).
## Input Datasets
- [dojo_sector_info](https://huggingface.co/datasets/AlphaDojo/dojo_sector_info)
- [dojo_sector_symbol_relations](https://huggingface.co/datasets/AlphaDojo/dojo_sector_symbol_relations)
- [dojo_stock_kline](https://huggingface.co/datasets/AlphaDojo/dojo_stock_kline)
- [dojo_quote](https://huggingface.co/datasets/AlphaDojo/dojo_quote)
|