Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alpha_vantage time fraome TimeSeries now seem to be reduced for chapter 6 #6

Closed
antoinecomp opened this issue Feb 4, 2021 · 1 comment · May be fixed by #7
Closed

alpha_vantage time fraome TimeSeries now seem to be reduced for chapter 6 #6

antoinecomp opened this issue Feb 4, 2021 · 1 comment · May be fixed by #7

Comments

@antoinecomp
Copy link

antoinecomp commented Feb 4, 2021

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.

@jamesmawm jamesmawm linked a pull request Mar 1, 2021 that will close this issue
@jamesmawm
Copy link
Collaborator

jamesmawm commented Mar 1, 2021

It seems Alpha Vantage dropped support for all indices data, there's no indication when these services will be restored.
In the meantime should we need some data for the purpose of continuing our studies, try using a stock ticker symbol instead.
I've updated parts using NDAQ, a company ticker as a proxy, This gives us a fairly stable but less accurate result.
It's in merge request #7, just pull the latest from master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants