feat(core): cross-sectional evaluation layer + honest README numbers#2
Merged
Merged
Conversation
The framework only supported single-asset time-series IC, but the broker research it reproduces (CPV, smart money, etc.) makes cross-sectional stock-selection claims: rank the universe by factor each day, form quantile portfolios, measure daily cross-sectional IC. CrossSectionAnalyzer takes a date x symbol panel and provides: - forward returns computed strictly within each symbol (no cross-symbol leakage from a global shift) - daily cross-sectional Pearson IC and Spearman RankIC with ICIR, positive ratio and t-stat, filtered by min_symbols per date - per-date quantile portfolios and top-minus-bottom long-short returns Tests: perfect monotonic factor => RankIC = 1, reversed => -1, random => ~0; leakage guard; min_symbols exclusion; monotonic quantile spread. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- '13+ brokers, 50+ strategies' -> 5 brokers with implemented reports, 24+ factors (dongfang/guangfa/guotai stay on the roadmap) - test badges/stats refreshed to real counts (pytest 24, self-test 39) - document the new cross-sectional evaluation layer Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
框架此前只有单标的时序 IC(因子值与同一标的自身未来收益的相关),而 CPV、聪明钱等研报的命题是横截面选股:每天在全体股票间按因子排序、分组、构建多空。评估语义与原研报不同构,"研报复现"名不副实。README 头部的 "13+ 家券商、50+ 个经典策略" 也与代码(5 家有实现、3 个目录为空)矛盾。
实现
qrp/core/cross_section.py— CrossSectionAnalyzer(date × symbol 长表面板):README 校准:头部数字对齐现实(5 家券商 15+ 篇研报),徽章更新为实际测试数(24/39),新特性入列。
测试
🤖 Generated with Claude Code