$CHANGE is calculated based on close instead of adj_close in the YahooCollector
Open
@SunsetWolf is already working on this.
Since Oct 24, 2023.
bug
- Dominant language
- Python
- Stars
- 48.7k
- Forks
- 7.7k
- PR merge metrics
- No merged PRs in 30d
Description
🐛 Bug Description
$CHANGE is calculated based on close instead of adj_close in the YahooCollector
To Reproduce
Steps to reproduce the behavior:
- Download the data from Yahoo Finance. Using 301303.SZ as an example only because the dataset is small.
- Notice the following data in the downloaded csv (removed unnecessary columns for demonstration purpose)
Date,Close,Adj Close 2023-06-05,23.120001,22.893938 2023-06-06,22.500000,22.280001 2023-06-07,22.240000,22.240000 - Normalize the downloaded csv file using
data_collector.yahoo.collector.YahooNormalizeCN1d. - Check the normalized data. The
changeon 2023-06-06 is-0.026816608996539815which is correct and thechangeon 2023-06-07 is-0.011555555555555652which is wrong.
Expected Behavior
The change on 2023-06-07 should be 22.240000/22.280001 - 1. = -0.0017953769391662044.
Screenshot
Environment
Linux x86_64
Python version: 3.8.16
Qlib version: 0.9.1
Additional Notes
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.