Skip to content

Commit c78fb2e

Browse files
committed
use daily close instead of daily adjusted close
This change is suggested by [imolitor](https://github.com/imolitor) in his [comment on issue jinglescode#21](jinglescode#21 (comment)).
1 parent 749689e commit c78fb2e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

project.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
"key": "YOUR_API_KEY", # Claim your free API key here: https://www.alphavantage.co/support/#api-key
2020
"symbol": "IBM",
2121
"outputsize": "full",
22-
"key_adjusted_close": "5. adjusted close",
22+
# "key_adjusted_close": "5. adjusted close",
23+
# Adjusted close is a premium feature, so we use close instead. To make this change less invasive, we keep the key "key_adjusted_close"
24+
"key_adjusted_close": "4. close",
2325
},
2426
"data": {
2527
"window_size": 20,
@@ -51,8 +53,10 @@
5153

5254
def download_data(config):
5355
ts = TimeSeries(key=config["alpha_vantage"]["key"])
54-
data, meta_data = ts.get_daily_adjusted(config["alpha_vantage"]["symbol"], outputsize=config["alpha_vantage"]["outputsize"])
55-
56+
# data, meta_data = ts.get_daily_adjusted(config["alpha_vantage"]["symbol"], outputsize=config["alpha_vantage"]["outputsize"])
57+
# # Adjusted close is a premium feature, so we use close instead. To make this change less invasive, we keep the key "key_adjusted_close"
58+
data, meta_data = ts.get_daily(config["alpha_vantage"]["symbol"], outputsize=config["alpha_vantage"]["outputsize"])
59+
5660
data_date = [date for date in data.keys()]
5761
data_date.reverse()
5862

0 commit comments

Comments
 (0)