With Google Finance, I'm trying to calculate the 12-month moving average of a ticker. For example, I want to retrieve end-of-month closing price for a ticker for the last 12 months and find the average of these values.
I've tried to refer to this question: GoogleFinance: Get History By Month
Though I was able to retrieve the end-of-month closing prices, it wasn't letting me calculate the average of these values. I think this is because all the numbers are formatted as texts.
Any idea on how I can accomplish this?
EDIT: here is what I have so far and hopefully this provides a better sense of my desired outcome.
https://docs.google.com/spreadsheets/d/1Mf9wVli7ofJBGTaNTVrfGREMAwDNQwwO6nZWDwyGCbM/edit?usp=sharing
value()
function.You may use the formula below:
=average(arrayformula(value(B2:B14)))
Output: