Hey, everyone! In this blog post, I'm going to show you how I use Google Sheets to do some cool coding stuff with stock data. Specifically, I'm going to explain how I filter by column and calculate the closing averages over different time periods for different companies. Sounds fun, right? First, let me tell you how I set up my spreadsheet. I have a sheet called "Indicators" where I store all the data I need. In row 2, I have the ticker symbols of the companies I'm interested in, sorted alphabetically from left to right. In row 13, I have a formula that uses the GOOGLEFINANCE function to get the closing prices of each stock for the past 185 trading days. For example, in cell H13, I have this formula: =INDEX(GOOGLEFINANCE(H2,"PRICE",TODAY()-185,TODAY()),,2)
A periodical exploring the art of investing, financial knowledge, and the stories that shape a meaningful life.