(1)
bysort security: egen maxclose = max(close)
list security close date if close == maxclose
Note that -list- will catch ties when they occur.
(2) depends on how weekly returns are calculated.
Nick
n.j.cox@durham.ac.uk
Natarajan Ramachandran
> I have a couple of securities in a variable and their closing
> prices with a corresponding date.
>
> (1) How do I loop through each security to find out the
> maximum closing price and the corresponding date?
>
> (2) How do I loop through each security to find out the
> weekly returns?
<<winmail.dat>>