fix(validation): restore LEAN case-study benchmark#26
Open
stefan-jansen wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Restores and hardens the LEAN validation/benchmarking surface so cross-engine parity comparisons remain consistent, and adds a LEAN case-study regression test + harness code under ml4t.backtest._validation.
Changes:
- Add helpers to fully disable commission/slippage fields in
validation/benchmark_suite.pyto prevent cost-model auto-activation from preset leftovers. - Adjust LEAN benchmark reporting to treat decoded fills as “trade count” for parity with other engines.
- Add a LEAN case-study parity harness module and a regression test that compares fill multisets + terminal portfolio value.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
validation/benchmark_suite.py |
Centralizes “zero-cost mode” resets and adjusts LEAN trade-count reporting for cross-engine parity. |
tests/benchmark/test_case_study_lean.py |
Adds a regression test intended to validate ml4t’s LEAN reconstruction against committed LEAN artifacts. |
src/ml4t/backtest/_validation/case_study_lean.py |
Implements the case-study harness: workspace parsing, LEAN zip decoding, ml4t replay, and parity comparison utilities. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Restore the LEAN case-study parity harness with committed reference fixtures so CI executes the regression instead of skipping it. Clear direct cost fields in zero-cost benchmark configs and report LEAN decoded fills as trade counts for apples-to-apples parity comparisons.
d25a4ae to
fdcc4cd
Compare
Clear stop slippage in zero-cost benchmark configs, count empty LEAN fill tables as zero trades, and make the case-study LEAN harness documentation and parameter parsing explicit.
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
Validation