* fix: replace deprecated pandas fillna(method=) with ffill()/bfill()
Replace deprecated fillna(method="ffill"/"bfill") calls with modern
pandas ffill() and bfill() methods to fix FutureWarnings in pandas 2.x.
Also includes black formatting fixes for compliance.
This addresses the pandas deprecation warnings portion of issue #1981.
Other issues (date parsing, type conversion, timezone handling) will be
addressed in separate commits.
Fixes:
- Yahoo collector: 2 instances in calc_change() and adjusted_price()
- BaoStock collector: 1 instance in calc_change()
- Core utils: resam.py fillna operations
- Backtest: profit_attribution.py stock data processing
- High-freq ops: FFillNan and BFillNan operators
- Position analysis: parse_position.py weight processing
Partially addresses GitHub issue #1981
* lint with black
* lint with black
* limit minimum version of pandas
* limit minimum version of pandas
---------
Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
* fixed a problem with multi index caused by the default value of groupkey
* modify group_key default value
* limit pandas verion
* format with black
* fix docs error
* fix docs error
* fixed bugs caused by pandas upgrade
* remove needless code
* reformat with black
* limit version & add docs
* Init model for both dataset
* Remove some deprecated code
* Add model template;
* We must align with previous results
* We choose another mode as the initial version
* Almost success to run GRU
* Successfully run training
* Passed general_nn test
* gru test
* Alignment test passed
* comment
* fix readme & minor errors
* general nn updates & benchmarks
* Update examples/benchmarks/GeneralPtNN/workflow_config_gru2mlp.yaml
---------
Co-authored-by: Young <afe.young@gmail.com>
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
* download orderbook data
* fix CI error
* fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* test fix CI error
* optimize get_data code
* optimize get_data code
* optimize get_data code
* optimize README
---------
Co-authored-by: Linlang <v-linlanglv@microsoft.com>
* Intermediate version
* Fix yaml template & Successfully run rolling
* Be compatible with benchmark
* Get same results with previous linear model
* Black formatting
* Update black
* Update the placeholder mechanism
* Update CI
* Update CI
* Upgrade Black
* Fix CI and simplify code
* Fix CI
* Move the data processing caching mechanism into utils.
* Adjusting DDG-DA
* Organize import
* transpose dimension 1 and 2 to match nn.Conv1d input
* 1.update TCN benchmarks;
2.Emphasize updating the benchmark table;
* replace specific version with main
---------
Co-authored-by: lijinhui <362237642@qq.com>
* Remove lr_decay and lr_decay_steps params
More flexible way to pass a scheduler (via callable function) is already
supported
* remove lr_decay and lr_decay_steps from mlp workflow configs
* Waiting for bin data
* Complete readme
* CI
* Add inst filter by time
* Update qlib/data/dataset/processor.py
* typo
* Fix time filter bug
* Add Filter and set Universe
* Complete data pipeline
* Fix Provider Logger Info Args
* Add DQN; a minor bugfix in ppo reward.
* update readme. modify assertion logic in strategy check.
* Fix Doc issues and fix black
* Fix pylint Error
---------
Co-authored-by: Young <afe.young@gmail.com>
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
* Workflow runnable
* CI
* Slight changes to make the workflow runnable. The changes of handler/provider should be reverted before merging.
* Train experiment successful
* Refine handler & provider
* test passed
* Ready to test on server
* Minor
* Test passed
* TWAP training
* Add PPOReward
* Add a FIXME
* Refine PPO reward according to PR comments
* Minor
* Resolve PR comments
* CI issues
* CI issues
* CI issues
* Workflow runnable
* CI
* Slight changes to make the workflow runnable. The changes of handler/provider should be reverted before merging.
* Train experiment successful
* Refine handler & provider
* CI issues
* Resolve PR comments
* Resolve PR comments
* CI issues
* Fix test issue
* Black
* 1) check limit_up/down should consider direction; 2) fix some typo, typehint etc
* fix error
* Update test_all_pipeline.py
Believe it's just some arbitrary number.
The excess return is expected to change when trading logic changes.
* add flag forbid_all_trade_at_limit to keep previous behivour for backward compatibility
* config.py: fix typo; static method
* fix typo in qlib/utils/paral
* 1) limit numpy version as numba support for 1.24+ has not been released; 2) no need to use custom numba version for pytest.
* remove useless argument
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
* horizontally put the bar figures
* 1) use rangebreaks to handle gaps in datetime axis instead of make them string; 2) allow simultaneously plot rankic in ic_figure
* pylint improvement
* fix black lint
* better axis formatting
* default not show gaps
* resolve doc built error
* fix pylint
* Update qlib/contrib/report/analysis_model/analysis_model_performance.py
More detailed description
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
* Update qlib/contrib/report/analysis_model/analysis_model_performance.py
for Python backward compatibility
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
* add doc string
* fix black
* 1) limit numpy version as numba support for 1.24+ has not been released; 2) no need to use custom numba version for pytest.
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
* Fix the Errors/Warnings when building Qlib's documentation
* Fix
* Fix
* Empty
* Test CI
* Add doc compiling checking to CI
* Fix
* Tries to be consistent with Makefile
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
* fix gramma error in doc strings
* fix typos in exchange.py
* fix typos and gramma errors
* fix typo and rename function param to avoid shading python keyword
* remove redundant parathesis; pass kwargs to parent class
* fix pyblack
* further correction
* assign -> be assigned to
* add missing parameters to doc string in order_generate
* fix some typos in doc strings
* reformat base on code style standard
* Update qlib/backtest/__init__.py
* Update examples/run_all_model.py
* Update examples/run_all_model.py
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
* feat(data): ✨ add a general highfreq data handler for open source
Add HighFreqOpenHandler and HighFreqOpenBacktestHandler for data pipeline without paused_num
information.
* fix: position of parameter init
* style(data): 💄 rename open to general
* style(data): 💄 lint
* style: 💄 delete useless comment & fix inheritance relation
* style: 💄 lint
* style: 💄 remove duplicated function
Co-authored-by: mingzhehan <v-zhaoxing@Microsoft.com>
* Explain data crawler structure
* Add documentation for data and feature
* Update scripts/data_collector/yahoo/README.md
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
* Remove some confusing wording
* Add third party data source
* Fix command typo
* Update commands
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
* Done
* Fix test errors
* Revert profit_attribution.py
* Minor
* A minor update on collect_data type hint
* Resolve PR comments
* Use black to format code
* Fix CI errors