[英]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. 我正在使用python pandas数据框中的alpha_vantage API下载欧元对美元汇率的时间序列数据。 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.
我正在使用它来练习使用pandas和scikit来学习在加入其他技术指标列之后尝试使模型适合数据。 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?
使用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. 1)日期范围很旧,也许细节级别没有保留-您可以检查更多当前数据以查看它是否有所不同。
2) Should the data have highs and lows (I presume the answer is yes, or you wouldn't be asking) 2)数据应有高有低(我想答案是肯定的,否则您不会问)
And it's probably more of a question to send to Alpha Vantage support, as they will know if it is 'normal' 发送给Alpha Vantage支持可能是一个更大的问题,因为他们会知道这是否“正常”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.