1

I'm trying to pull 1/1/2021 stock price data with google finance but it gives an error. I can do it for 2020 or any other time but not 2021. Please write if you know how to solve.

=index(GOOGLEFINANCE("AAPL","close",DATE(YEAR(TODAY()),1,1)),2,2)
player0
  • 124,011
  • 12
  • 67
  • 124
Semi
  • 11
  • 2
  • US markets were closed on January 1, 2021 for the New Year's Day holiday. It looks like when you choose a date when markets were closed, you get the closing price of the following trading day. Since there hasn't yet been a trading day since then, there's no price to get. I expect it will work after the markets close on Monday, January 4. – Nate Eldredge Jan 02 '21 at 20:06

1 Answers1

0

you can run:

=GOOGLEFINANCE("AAPL", "close", DATE(2020, 12, 1), TODAY())

and see that there is no value for your date as of right now

solution:

  • wait a day or more
  • grab it from an alternative source (yahoo finance)
player0
  • 124,011
  • 12
  • 67
  • 124
  • Thanks for your advice, i will try to write a code like try, except in python. If it can't pull the data i will try to take one day before's data, will share the code here when its done. – Semi Jan 03 '21 at 08:18