Repository navigation
docs: clarify backtest volume units with regression tests - #2400
Draft
nep7une (shancun-c) wants to merge 1 commit into
Draft
nep7une (shancun-c) wants to merge 1 commit into
nep7une (shancun-c) wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree |
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.
Description
Document the existing price/volume/order unit contract and add offline regression coverage for both consumers of volume in
Exchange.adjusted_volume = raw_volume_in_shares / factorand matching adjusted order amounts, including price normalization to 1.volume_threshold, including why changing only a threshold or substituting turnover does not repair both paths.get_volume()'s docstring without changing runtime behavior.Motivation and Context
Related to #2362. This is a documentation and regression-test contribution, not a fix to a particular community dataset or an automatic scale-detection proposal. It does not download market data, change existing binary datasets, or add a blanket CN multiplier. The impact-cost description refers to the amount after volume clipping and before later cash/position clipping.
How Has This Been Tested?
Python 3.12, source checkout on Linux and Windows:
15 passed on each platform, including 12 new cases. Existing NumPy timedelta deprecation warnings remain.
--check --line-length 120on the changed Python files: passed.git diff --check: passed.The full pipeline suite and full Sphinx build were not run. No claim is made to reproduce or validate any particular community market-data archive.
Types of changes