🐛 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
change on 2023-06-06 is -0.026816608996539815 which is correct and the change on 2023-06-07 is -0.011555555555555652 which 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
🐛 Bug Description
$CHANGE is calculated based on close instead of adj_close in the YahooCollector
To Reproduce
Steps to reproduce the behavior:
Date,Close,Adj Close 2023-06-05,23.120001,22.893938 2023-06-06,22.500000,22.280001 2023-06-07,22.240000,22.240000data_collector.yahoo.collector.YahooNormalizeCN1d.changeon 2023-06-06 is-0.026816608996539815which is correct and thechangeon 2023-06-07 is-0.011555555555555652which is wrong.Expected Behavior
The
changeon 2023-06-07 should be22.240000/22.280001 - 1. = -0.0017953769391662044.Screenshot
Environment
Linux x86_64
Python version: 3.8.16
Qlib version: 0.9.1
Additional Notes