Skip to content

fix: harden neutralization and Baostock data handling#35

Merged
initial-d merged 2 commits into
initial-d:mainfrom
redamancy231-create:feat-baostock-fix-review
Jul 16, 2026
Merged

fix: harden neutralization and Baostock data handling#35
initial-d merged 2 commits into
initial-d:mainfrom
redamancy231-create:feat-baostock-fix-review

Conversation

@redamancy231-create

@redamancy231-create redamancy231-create commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What changed

This revision rebases the contribution onto the current main and keeps only the new fixes beyond #33 and #34.

  • use a scale-relative degeneracy guard in industry neutralization, avoiding amplified float32 noise without suppressing genuinely small signals
  • expand neutralization tests for orthogonality, rank-deficient designs, perfect fits, small-scale signals, masks, shapes, and dtypes
  • keep Baostock VWAP consistent with forward-adjusted OHLC through the typical-price proxy
  • reject unavailable raw VWAP explicitly instead of mixing adjusted and unadjusted data
  • normalize and validate complete sh./sz. ticker codes with regression tests

The previously merged Baostock report, dependency declarations, and CLI integration remain unchanged.

@initial-d
initial-d force-pushed the feat-baostock-fix-review branch from 50842a1 to c2be285 Compare July 16, 2026 15:39
@initial-d initial-d changed the title feat: Baostock A-share data source + neutralize tests (with review fixes) fix: harden neutralization and Baostock data handling Jul 16, 2026
@redamancy231-create
redamancy231-create force-pushed the feat-baostock-fix-review branch from c2be285 to 7c86a59 Compare July 16, 2026 15:40
- Merge upstream initial-d#34 + initial-d#33 with review fixes
- Keep upstream load_validation_panel validation + docs
- Keep 21-test neutralize suite with guard fix
- Keep source-aware _select_tickers + VWAP fix
Co-Authored-By: Claude <noreply@anthropic.com>
@redamancy231-create
redamancy231-create force-pushed the feat-baostock-fix-review branch from 7c86a59 to 43012af Compare July 16, 2026 15:40
@initial-d

Copy link
Copy Markdown
Owner

Thanks for the follow-up fixes. I amended the PR before merge to keep the contribution focused and numerically safe:

  • rebased the branch onto the current main and removed the duplicated test: add neutralize module tests (11 cases) #33/feat: add Baostock A-share data source + validation report (25 stocks, 2021-2024) #34 content
  • changed the absolute neutralization cutoff to a scale-relative degeneracy guard, so small but valid signals are not suppressed
  • expanded the tests to cover orthogonality, true rank deficiency, perfect fits, scale invariance, masks, shapes, and dtypes
  • kept Baostock VWAP on the forward-adjusted OHLC basis and rejected unavailable raw VWAP explicitly
  • strengthened ticker validation to require complete sh./sz. plus six-digit codes
  • cleaned the PR title and commit metadata

CI is green on Python 3.9, 3.10, and 3.11.

@initial-d
initial-d merged commit 20957d8 into initial-d:main Jul 16, 2026
3 checks passed
initial-d added a commit that referenced this pull request Jul 16, 2026
Pairing: harden neutralization and Baostock data handling
@initial-d

Copy link
Copy Markdown
Owner

Post-merge history correction: the contributor branch changed again while the verified CI run was in progress, so the initial merge briefly referenced an unreviewed duplicate-history commit. main has been corrected with --force-with-lease to the reviewed tree.

The authoritative commits are now:

The resulting tree contains the focused six-file fix described above and no AI-tool trailer. GitHub revoked maintainer write access to the fork branch after merge, so the PR head ref itself could not be rewritten again; this note records the discrepancy explicitly.

redamancy231-create added a commit to redamancy231-create/ml-quant-trading that referenced this pull request Jul 16, 2026
- Rebase on upstream/main after initial-d#35 merge

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants