Connor Gasgarth
Connor Gasgarth

Reputation: 21

Google Sheets / Google Finance return the day a stock hit its max or lowest price

I am finding the max of a stocks price from a starting date to 3 months after that date and I want to get the date that the stock hits its max so I compare it to SPY over that same time. My current formula for finding the stock's max is

=max(index(GOOGLEFINANCE(A2, "high", B2, E2,"DAILY"),0,2))

Is there a way I can get the date that this max happens so I can find SPY's price for that date?

Upvotes: 0

Views: 550

Answers (1)

Connor Gasgarth
Connor Gasgarth

Reputation: 21

=TO_DATE(INDEX(SORT(GOOGLEFINANCE(A2, "HIGH", E2,B2), 2, 0), 2,1))

Upvotes: 1

Related Questions