Python pandas Google finance international stocks - 寻找与谷歌获取国际股票价格历史的方法

标签 python pandas

<分区>

这行得通:国内股票

gticker='NYSE:IBM'
import pandas.io.data as web
dfg = web.DataReader(gticker, 'google', '2013/1/1', '2014/3/1')

这不是:国际股票

gticker='HKG:0700'
import pandas.io.data as web
dfg = web.DataReader(gticker, 'google', '2013/1/1', '2014/3/1')

尽管对于这两者,您都可以转到“历史价格”链接并查看历史数据。

有什么建议吗?

最佳答案

Google 财经似乎只支持美国和英国市场的 CSV 下载,因为“历史图表”下的“下载到电子表格”链接仅出现在以下示例中这两个市场上市的股票:

汇丰股票在英国上市 https://www.google.com/finance/historical?q=LON%3AHSBA

在美国上市的汇丰股票 https://www.google.com/finance/historical?q=NYSE%3AHSEA

香港汇丰股票上市 https://www.google.com/finance/historical?q=HKG%3A0005

关于Python pandas Google finance international stocks - 寻找与谷歌获取国际股票价格历史的方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22779850/

相关文章:

python - 狮身人面像 : document data in python without displaying the data

python - 如何为 Pandas 动态创建不同长度的 '&' 过滤器

Python Pandas Dataframe 填充 NaN 值

python - 查找 Pandas Series 包含包含字符的元素的位置的索引

python - 使用文件的python打印语句中的无效语法错误

python - 计算文件中的特定字符(Python)

python - 读取 CSV 文件、操作列并将结果附加到新列中。 Python 2.7

python - Netsuite REST Web 服务 API GET 请求,在 Postman 之外

python - 组合日期时间行及其值

python - 对于已排序的 DataFrame,数字索引和列返回最接近传递的给定值的索引值和列名称的元组