Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backtest Mypy #1130

Merged
merged 9 commits into from Jun 28, 2022
Merged

Backtest Mypy #1130

merged 9 commits into from Jun 28, 2022

Conversation

lihuoran
Copy link
Contributor

@lihuoran lihuoran commented Jun 15, 2022

Description

Complement typehint under qlib/backtest so that all files except high_performance_ads.py can pass mypy checking now.

profit_attribution.py remains unchanged and high_performance_ds.py is partially updated since there are complex logics in these two files. The original version of profit_attribution.py will not cause any mypy issues, and high_performance_ds.py will be ignored by now. We leave these two files to future work.

Motivation and Context

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

qlib/backtest/decision.py Outdated Show resolved Hide resolved
qlib/backtest/exchange.py Outdated Show resolved Hide resolved
qlib/backtest/exchange.py Show resolved Hide resolved
qlib/backtest/high_performance_ds.py Outdated Show resolved Hide resolved
qlib/backtest/high_performance_ds.py Outdated Show resolved Hide resolved
qlib/backtest/high_performance_ds.py Outdated Show resolved Hide resolved
qlib/backtest/report.py Outdated Show resolved Hide resolved
qlib/backtest/report.py Outdated Show resolved Hide resolved
qlib/backtest/report.py Show resolved Hide resolved
qlib/data/data.py Outdated Show resolved Hide resolved
@you-n-g
Copy link
Collaborator

you-n-g commented Jun 28, 2022

Please merge the main branch to run the new version of CI. Thanks

@you-n-g
Copy link
Collaborator

you-n-g commented Jun 28, 2022

It looks great now! Thanks

@you-n-g you-n-g merged commit 23c657a into main Jun 28, 2022
@lihuoran lihuoran deleted the huoran/backtest_mypy branch August 3, 2022 07:05
@you-n-g you-n-g added the enhancement New feature or request label Dec 9, 2022
qianyun210603 pushed a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants