Skip to content

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

@antoinecomp

Description

@antoinecomp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions