refactor: customize workflow example with configurable date range#2134
Open
asika wants to merge 2 commits intomicrosoft:mainfrom
Open
refactor: customize workflow example with configurable date range#2134asika wants to merge 2 commits intomicrosoft:mainfrom
asika wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Change test segment from (2017-01-01, 2020-08-01) to (2017-01-01, 2017-01-20) so the model only predicts ~10 consecutive trading days. Inline the task config instead of importing CSI300_GBDT_TASK to allow per-variable overrides. https://claude.ai/code/session_0166zKhXb3BvVHad66b1ZKYw
Wraps the Yahoo download -> normalize -> dump_bin -> instrument
generation pipeline into a single CLI entry point so users can
prepare Alpha158-ready US stock data with one command:
python scripts/prepare_us_data.py all
https://claude.ai/code/session_0166zKhXb3BvVHad66b1ZKYw
|
@asika please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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
Refactored the
workflow_by_code.pyexample to make it more flexible and easier to customize. The main changes include:CSI300_GBDT_TASKto importingCSI300_MARKETandGBDT_MODELseparately for better modularityTEST_STARTandTEST_ENDvariables to easily customize the prediction period (currently set to predict 10 trading days starting from 2017-01-01)CSI300_GBDT_TASKreference with an explicittask_configdictionary that clearly shows all configuration parametersTEST_STARTandTEST_ENDvariables instead of hardcoded datesThese changes make the example more transparent and easier for users to understand and modify the workflow configuration for their own use cases.
Motivation and Context
The original example relied on a pre-defined task configuration that was not visible in the code. By inlining the configuration and making key parameters (like date ranges) configurable, users can more easily understand what the example does and customize it for their needs.
How Has This Been Tested?
pytest qlib/tests/test_all_pipeline.pyunder upper directory ofqlib.Types of changes
https://claude.ai/code/session_0166zKhXb3BvVHad66b1ZKYw