[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Unique values
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.
> 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?