Hi

I am working with daily stock price data for a large number of companies. I want to keep the last trading day data for each company for all the months. How it can be done? Attaching sample of data:

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input str6 CompanyName int(StockPrice Date)
"A ltd." 100 21569
"A ltd." 102 21570
"A ltd." 101 21571
"A ltd." 102 21572
"A ltd." 102 21573
"A ltd." 102 21574
"A ltd." 103 21575
"A ltd." 102 21576
"A ltd." 104 21577
"A ltd." 102 21578
"B ltd." 200 21569
"B ltd." 202 21570
"B ltd." 204 21571
"B ltd." 206 21572
"B ltd." 208 21573
"B ltd." 210 21574
"B ltd." 212 21575
"B ltd." 214 21576
"B ltd." 216 21577
"B ltd." 218 21578
"A ltd." 300 21600
"A ltd." 302 21601
"A ltd." 304 21602
"A ltd." 306 21603
"A ltd." 308 21604
"A ltd." 310 21605
"A ltd." 312 21606
"A ltd." 314 21607
"A ltd." 316 21608
"B ltd." 400 21600
"B ltd." 402 21601
"B ltd." 404 21602
"B ltd." 406 21603
"B ltd." 408 21604
"B ltd." 410 21605
"B ltd." 412 21606
"B ltd." 414 21607
"B ltd." 416 21608
end
format %td Date