gpt4 book ai didi

regex - Google 表格中 googlefinance 功能支持的股票代码文档

转载 作者:行者123 更新时间:2023-12-03 19:20:11 27 4
gpt4 key购买 nike

Google 表格中的 GOOGLEFINANCE 函数允许您查找股票或工具的价格(或其他属性)。

https://support.google.com/docs/answer/3093281?hl=en

但是,它支持哪些符号的文档很少。

例如,this fund有一个符号“GB00B59G4Q73”,在Yahoo finance works中搜索这个.

但是这个和符号“0P0000KSP6.L”在谷歌表格中都不起作用,给出错误“在评估GOOGLEFINANCE时,对符号的查询:'GB00B59G4Q73'没有返回数据。”

如何确定我是否使用了正确的符号,或者函数是否不支持该符号?

最佳答案

这是您的“官方文档”:

ticker - The ticker symbol for the security to consider.

  • Note: Reuters Instrument Codes are no longer supported. For example, ticker 123.TO or XYZ.AX would not work. Instead, use TSE:123 or ASX:XYZ.

  • Recommended: Add an exchange to avoid discrepancies. For example, use “NASDAQ:GOOG” instead of “GOOG." If an exchange is not specified, GOOGLEFINANCE will use its best judgement to choose one for you.


这意味着你能做的最好的事情就是去 https://www.google.com/finance 并在那里搜索您的股票代码,而不是雅虎或其他不受支持的供应商

但你总是可以从雅虎那里抓取它:
=SUBSTITUTE(SPLIT(REGEXEXTRACT(QUERY(IMPORTXML(
"https://uk.finance.yahoo.com/quote/0P0000KSP6.L?p=0P0000KSP6.L&.tsrc=fin-srch", "//*"),
"select Col1
where Col1 contains 'Vanguard FTSE Dev World ex UK Equity Index AccLSE - LSE'
limit 1
offset 8", 0), "GBp(.*)"), "-"), ",", )*1
enter image description here

关于regex - Google 表格中 googlefinance 功能支持的股票代码文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59534960/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com