Retrieving and count missing delisting return from last trading day
2 次查看(过去 30 天)
显示 更早的评论
I have list of stocks identified by PERMNO. I want to find out if the last trading day of each stock has a delisting return (DLRET) and how many delisting returns are missing in total in the data. In the first picture we see that PERMO 10000 last trading day is 1987.06.30 and has a delisting return 0, so I don't need to count it (count if it is NaN). The last date in the dataset is 2011.12.30 which means that if the last trading date is this date, then it should not count because it is not delisted. For example in picture 2, PERMNO 10001 should not count as the missing delisting return is because the last date is 2011.12.30, when the dataset ends and the stock is not delisted.
Can someone help with a code that can retreive all the delisting returns and count all delisting returns that are missing in the dataset?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/746159/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/746164/image.jpeg)
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Transaction Cost Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!