Repository navigation
Conversation
This was referenced Oct 27, 2026
This branch has not been deployed
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.
Summary
The training dataset previously coupled today's forward-label validity to tomorrow's factor availability. A limit-move exclusion can invalidate tomorrow's factors while today's observed return label remains valid.
FactorDatasetaccepts a separate already-alignedlabel_mask, and the CLI suppliestarget_01's mask. Calls without the new argument retain the legacy intersection. Nonfinite training inputs are excluded and mask/label shapes are checked.Forward labels now require finite positive closes at both endpoints and a finite computed return. Zero/negative prices no longer become clamped extreme returns; masked NaN/Inf produce zero values with false masks. Genuine zero returns stay valid. Positive integer horizons at or beyond panel length have no valid labels; multi-row horizons check endpoints only.
The mask contract distinguishes observations, factor exclusions, historical labels and order feasibility. This can change training sample counts; it is not new market-performance or alpha evidence.
Type of change
Reproducibility
Collaboration
Validation
Clean Python 3.12.14 / PyTorch 2.14.1, macOS 26.6.2, Apple M5 CPU:
docs/audits/training-masks-20261023/preserves the original checks and older-environment failures.docs/audits/forward-labels-20261024/records the endpoint follow-up and raw test output. All evidence is synthetic/unit-test engineering evidence; archived public-data returns are not revalidated.