Google Finance 获取年初至今的电子表格

Google Finance get year to date spreadsheets

我正在使用 Google 工作表从 Google Finance 获取股票数据,我怎样才能获得年度百分比变化?

对于 Google 和一整年,请尝试:

=100*(googlefinance("GOOG")/index(googlefinance("GOOG","price",today()-365),2,2)-1)

或者,对于这个 year-to-date:

=100*(googlefinance("GOOG","price")/index(googlefinance("GOOG","price",date(2018,12,31)),2,2)-1)