Dear statalist,

I have a set of firms (symbol is used to identify firms) with year and delisting year. My sample period is 2009-2019, I want to drop observations in a year if the delisting year is earlier than or equal to the current year. For example, now is 2010, firm A is delisted in 2004, so by the end of 2010 it doesn't exist anymore, this observation needs to be dropped. If now is 2010, firm B is delisted during 2010, by the end of 2010 this firm also doesn't exist, so need to drop this observation. If now is 2010, and firm C is delisted in 2015, the firm still exists in 2010, so I should keep it. How can I achieve this? Please kindly give me some advice. Thanks a lot!