Skip to content

Add walk-forward splits and data manifest - #6

Merged
bozarnr merged 6 commits into
mainfrom
loop/pass2-quant-toolkit-walkforward
Jul 31, 2026
Merged

Add walk-forward splits and data manifest#6
bozarnr merged 6 commits into
mainfrom
loop/pass2-quant-toolkit-walkforward

Conversation

@bozarnr

@bozarnr bozarnr commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Adds a small, test-covered research workflow layer:

  • walk-forward split objects and panel slicing
  • dataset manifest helper for reproducible public examples
  • tests for split ordering, panel slicing, manifest shape, and validation failures
  • updated diagnostics report to reflect the new capability

Local verification: C:\qds\Scripts\python.exe -m unittest discover -s tests -v passed with 13 tests.

Copilot AI review requested due to automatic review settings July 31, 2026 08:06
@bozarnr
bozarnr merged commit 92d12eb into main Jul 31, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a small research-workflow layer to the toolkit by introducing walk-forward split utilities and a dataset manifest helper, with accompanying unit tests and an updated example diagnostics report to reflect the new capabilities.

Changes:

  • Added WalkForwardSplit, build_walk_forward_splits, and apply_split for strict train-before-test rolling windows.
  • Added DataManifest for serializable dataset metadata (shape, identity columns, known limitations).
  • Added unit tests for split ordering/panel slicing and manifest shape/validation; updated example diagnostics markdown.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_splits.py Adds unit tests covering split construction ordering and panel slicing behavior.
tests/test_manifest.py Adds unit tests covering manifest serialization and identity-column validation.
src/quant_toolkit/splits.py Introduces walk-forward split dataclass + helpers to build/apply splits.
src/quant_toolkit/manifest.py Introduces DataManifest for reproducible dataset metadata.
src/quant_toolkit/init.py Exposes new manifest/splits APIs via package exports.
reports/example-diagnostics.md Updates documentation to describe the expanded workflow capabilities.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

raise ValueError(f"missing manifest identity columns: {missing}")
return cls(
source=source,
created_at=pd.Timestamp.utcnow().isoformat(),
Comment on lines +63 to +65
dates = pd.to_datetime(panel[date_col])
train_mask = (dates >= split.train_start) & (dates <= split.train_end)
test_mask = (dates >= split.test_start) & (dates <= split.test_end)
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