Reputation: 21
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
Reputation: 21
=TO_DATE(INDEX(SORT(GOOGLEFINANCE(A2, "HIGH", E2,B2), 2, 0), 2,1))
Upvotes: 1