Can anyone please give me some clue how I can keep the last observation of "EACH" year of a specific company in a weekly panel data in order to annualize it? If I create year variable from the date and use last.year command, it only retains the last observation for the company, NOT the last for "EACH" year. I tried sorting the data by year and then permno instead of by permno and then year, but had no luck; it then keeps only 1 observation from each year and deletes other years' data for other companies. Thanks.
... View more