-
Notifications
You must be signed in to change notification settings - Fork 6.2k
$CHANGE is calculated based on close instead of adj_close in the YahooCollector #1563
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working