chore: close remaining copilot cleanup items - #29
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR closes remaining cleanup items by improving documentation accuracy, making a legacy test call clearer/safer via keyword arguments, and refactoring order execution handling to avoid repeated “insufficient cash” predicate computation.
Changes:
- Fix README clone instructions to
cd backtestafter cloningml4t/backtest. - Update a legacy
Broker._update_time(...)test call to use keyword arguments for cache inputs. - Compute the
"insufficient" in rejection_reason.lower()predicate once inExecutionEngine._process_single_orderand reuse it across branches.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Corrects the post-clone directory name in the development quickstart commands. |
| tests/test_broker.py | Switches _update_time invocation to explicit keyword args for cache fields (timestamp, prices, opens, highs, lows, volumes, signals). |
| src/ml4t/backtest/core/execution_engine.py | Refactors execution flow to compute insufficient_cash once and reuse it for rejection/partial-fill branching. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
_update_timetest callVerification