I am using Google Sheets for fetching EOD prices of Indian stocks, using the function
=GOOGLEFINANCE("IOC","price")
Google is returning 19.51 but the closing price for IOC on 11-11-2019 is INR 135.40.
I am using Google Sheets for fetching EOD prices of Indian stocks, using the function
=GOOGLEFINANCE("IOC","price")
Google is returning 19.51 but the closing price for IOC on 11-11-2019 is INR 135.40.
price
shows real-time of a particular stock. To get closing price use close
.For example:
=GOOGLEFINANCE("NSE:IOC","close",DATE(2019,11,11))
For more information you can visit the documentation.
I found a workaround:
=ROUND(IF(MIN(GOOGLEFINANCE(A1,"marketcap")/GOOGLEFINANCE(A1,"shares"),GOOGLEFINANCE(A1,"price"))=0,GOOGLEFINANCE(A1,"marketcap")/GOOGLEFINANCE(A1,"shares"),MIN(GOOGLEFINANCE(A1,"marketcap")/GOOGLEFINANCE(A1,"shares"),GOOGLEFINANCE(A1,"price"))),3)
Haven't fully tested it yet but works so far.
First of All Google Finance function is not designed to be used for only Indian Markets hence this problem is occuring. When you search for the live prices of IOC (Indian Oil Corporation as is yours case) its showing the prices of a scrip named IOC (Itochu Corp a Japanese Company listed on Frankfurt Stock exchange)Price of IOC as FRA stock
So to Get the Price of Indian Oil Corporation you have to use the script name as NSE:IOC instead of just IOC