qlib
qlib copied to clipboard
Fix Yahoo daily data format inconsistent
Before the closing of the day, the daily API of Yahoo returns data format that includes hours, minutes, and seconds, which is different from the closed index format. This issue needs to be fixed.
Description
1.Fix FutureWarning: Passing unit-less datetime64 dtype to .astype is deprecated and will raise in a future version. Pass 'datetime64[ns]' instead
Motivation and Context
How Has This Been Tested?
- [ ] Pass the test by running:
pytest qlib/tests/test_all_pipeline.py
under upper directory ofqlib
. - [ ] If you are adding a new feature, test on your own test scripts.
Screenshots of Test Results (if appropriate):
- Pipeline test:
- Your own tests:
Types of changes
- [x] Fix bugs
- [ ] Add new feature
- [ ] Update documentation