Yahoo Finance Data in Google Sheet
Google Apps Script
SUMMARY
This Google Apps Script pulls daily stock quotes from the Yahoo Finance API. It stores the data in a Google Sheet for historical look-ups. The script updates a summary sheet by calculating today's price change in dollars and percentage.
Get Yahoo Finance data
A Google Sheet serves as a repository for historical stock prices.
Every stock ticker has a column. Every row represents the market close data for a given date.
Automated API processing
An Installable Trigger launches a Google Apps Script that fetches daily stock prices for a customized list of stock tickers after market close.
The script avoids data duplication by comparing the API date with the last date stored in the sheet: it either appends a new data row or updates the last row's data.
Summary dashboard
A summary sheet includes calculated metrics that uses the historical data, such as difference in prices between yesterday and today.
The user can update the sheet manually at any time using a custom menu option.