简体   繁体   English

Alpha_Vantage API返回不正确的时间序列数据

[英]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.

相关问题 值错误:无效的 API 调用。 请参阅 Alpha_vantage 文档了解 TIME_SERIES_INTRADAY - ValueError: Invalid API call. Please refer to the Alpha_vantage documentation for TIME_SERIES_INTRADAY 在get_intraday的alpha_vantage api中未获得给定时间间隔的最后一个柱线数据 - Not getting the last bar data for the given time interval in the alpha_vantage api, get_intraday alpha_vantage API (python) 不提供调整后的数据 - alpha_vantage API (python) not giving adjusted data 如何使用 python alpha_vantage API 返回扩展的盘中数据? - How do you use the python alpha_vantage API to return extended intraday data? Alpha Vantage API 日内时间序列为外国股票转换为 pandas df - Alpha Vantage API time series intraday for foreign stocks into a pandas df ModuleNotFoundError:没有名为“alpha_vantage”的模块 - ModuleNotFoundError: No module named 'alpha_vantage' 当我尝试在 Spyder 上导入 alpha_vantage 时,出现“No module named 'alpha_vantage'”错误 - I get a 'No module named 'alpha_vantage'' error when i try importing alpha_vantage on Spyder Alpha_Vantage ts.get_daily 以 [0] 结尾 - Alpha_Vantage ts.get_daily ending with [0] 如何从 Alpha Vantage API 中提取数据? - How to extract the data from Alpha Vantage API? Alpha Vantage API 与 Django - 解析数据 - Alpha Vantage API with Django - Parsing data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM