-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Description
I want to get the DJIA values for 2020 in order to reproduce it with a Principal Component Analysis following chapter 6 using alpha_vantage. Yet it seems that if James Ma was able to get the data for the whole year, now it seems that we only have two months:
"""
Download the all-time DJIA dataset
"""
from alpha_vantage.timeseries import TimeSeries
# Update your Alpha Vantage API key here...
ALPHA_VANTAGE_API_KEY = 'MYKEY'
from pprint import pprint
ts = TimeSeries(key=ALPHA_VANTAGE_API_KEY, output_format='pandas')
df, meta_data = ts.get_intraday(symbol='DIA',interval='1min', outputsize='full')
pprint(df.info())
Returns:
<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 5351 entries, 2021-02-03 20:00:00 to 2021-01-21 04:02:00
Data columns (total 5 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 1. open 5351 non-null float64
1 2. high 5351 non-null float64
2 3. low 5351 non-null float64
3 4. close 5351 non-null float64
4 5. volume 5351 non-null float64
dtypes: float64(5)
memory usage: 250.8 KB
Has alpha_vantage reduced the available data? Can I extend the timeframe? If it is not possible, how can I get the data for the DJIA otherwise?
Side note: ticker ^DJI isn't available anymore.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels