简体   繁体   中英

Alpha_Vantage API returning incorrect time series data

I am downloading time series data for the Euro to USD exchange rate using the alpha_vantage API in a python pandas dataframe. I am using this to practice using pandas and scikit learn to attempt to fit models to the data after joining additional columns of technical indicators. I successfully built a large dataframe of prices and technical indicators, but was surprised to find all the open, close, high and low prices are equal across every row. I know that this cannot be accurate. Is this a problem seen before with the alpha_vantage API?

#timeseries class from alpha_vantage module
ts = timeseries.TimeSeries(key = '(My Key)',output_format = 'pandas')
#price pandas dataframe
price_df = ts.get_daily(symbol = 'EURUSD', outputsize='full')[0]
#show dataframe
price_df
            1. open  2. high  3. low  4. close  5. volume
date                                                     
1998-01-02   1.0866   1.0866  1.0866    1.0866        0.0
1998-01-05   1.0776   1.0776  1.0776    1.0776        0.0
1998-01-06   1.0754   1.0754  1.0754    1.0754        0.0
1998-01-07   1.0733   1.0733  1.0733    1.0733        0.0
1998-01-08   1.0784   1.0784  1.0784    1.0784        0.0
1998-01-09   1.0764   1.0764  1.0764    1.0764        0.0
1998-01-12   1.0769   1.0769  1.0769    1.0769        0.0
1998-01-13   1.0755   1.0755  1.0755    1.0755        0.0
1998-01-14   1.0749   1.0749  1.0749    1.0749        0.0
1998-01-15   1.0699   1.0699  1.0699    1.0699        0.0
1998-01-16   1.0719   1.0719  1.0719    1.0719        0.0
1998-01-19   1.0669   1.0669  1.0669    1.0669        0.0
1998-01-20   1.0646   1.0646  1.0646    1.0646        0.0
1998-01-21   1.0722   1.0722  1.0722    1.0722        0.0
1998-01-22   1.0868   1.0868  1.0868    1.0868        0.0
1998-01-23   1.1002   1.1002  1.1002    1.1002        0.0

Welcome to Stack Overflow. I don't know the answer to your question, but there are a few things to consider:

1) The date range is quite old, and perhaps that level of detail isn't retained - you could check on more current data to see if it does vary.

2) Should the data have highs and lows (I presume the answer is yes, or you wouldn't be asking)

And it's probably more of a question to send to Alpha Vantage support, as they will know if it is 'normal'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM