使用GoogleFinance,您能否获得以上日期的股票的上面交易日的收盘价?
我想使用一个公式输入日期并获得上一个交易日的收盘价。
我一直无法在线找到解决方案。查看时,我找到了“最近的”属性,但这似乎不允许您输入日期。
我尝试从日期开始减去1,以获取前一天。但是,当前一天是关闭市场的时候(例如周末)时,我获得的收盘价与输入的日期相同。
例如,6月24日(星期五)Google的收盘价为2370.76,6月27日(星期一)为2332.45。我想要一个公式,该公式将在6月27日给定日期的6月24日的收盘价。我尝试了以下公式:
=INDEX(GOOGLEFINANCE("GOOG","close","27/06/22"-1),2,2)
但是这给出了6月27日的收盘价(2332.45)。 (注意日期将是对另一个单元格的引用。)
I want to use a formula to input a date and get the previous trading day's closing price.
I have been unable to find a solution online. When looking, I found the "closeyest" attribute, but it seems this doesn't allow you to enter a date.
I have tried subtracting 1 from the date to get the previous day. However, when the previous day is when markets are closed (such as a weekend), the closing price I get is the same as the date inputted.
For example, the closing price of Google on June 24 (Friday) was 2370.76 and June 27 (Monday) was 2332.45. I want a formula which would give the closing price of June 24 when given the date of June 27. I have tried the following formula:
=INDEX(GOOGLEFINANCE("GOOG","close","27/06/22"-1),2,2)
But this gives the closing price of June 27 (2332.45). (Note the date would be a reference to another cell.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
end_date
参数限制最终日期,search_key
end_date
parameter to limit the final datesearch_key
as the data is sorted尝试:
try: