Hi all,

I am trying to remove observations of TICKER's who don't have the full date range which is the 02may2018 - 17feb2020.

Some of the TICKERs have observations that range from 15aug2019 - 22dec2019 and I want to drop all TICKERS that does not have observations from 02may2018 - 17feb2020.

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input float date str5 TICKER float holding
21306 "A"       590
21307 "A"  586.4737
21308 "A"  587.4583
21309 "A"       588
21310 "A"       588
21311 "A"     585.9
21312 "A"   577.125
21313 "A"  581.2083
21314 "A"  583.0417
21315 "A"   595.625
21316 "A"       616
21317 "A"       616
21318 "A"  661.9167
21319 "A"  910.1667
21320 "A" 1186.4584
21321 "A" 1225.4375
21322 "A" 1146.5294
21323 "A"      1111
21324 "A"      1111
21325 "A" 1082.5834
21326 "A" 1001.3333
21327 "A"  939.4583
21328 "A"  921.7059
21329 "A"   905.875
21330 "A"       904
21331 "A"       904
21332 "A"       904
21333 "A"       904
21334 "A"     909.6
21335 "A"  905.8333
21336 "A"  895.2083
21337 "A"       885
21338 "A"       885
21339 "A"  882.4583
21340 "A"  875.1667
21341 "A"  862.0833
21342 "A"  828.2083
21343 "A"   813.375
21344 "A"  804.5833
21345 "A"       805
21346 "A"  796.7826
21347 "A"  779.7083
21348 "A"  776.0417
21349 "A"  767.9583
21350 "A"       758
21351 "A"       751
21352 "A"       751
21353 "A"  750.4583
21354 "A"  750.5833
21355 "A"   752.625
21356 "A"  752.2917
21357 "A"  747.2917
21358 "A"       744
21359 "A"       744
21360 "A"  742.2174
21361 "A"   739.375
21362 "A"   739.125
21363 "A"    765.25
21364 "A"  817.6667
21365 "A"       837
21366 "A"       837
21367 "A"    838.25
21368 "A"    840.75
21369 "A"       836
21370 "A"   834.375
21371 "A"   826.625
21372 "A"       823
21373 "A"       823
21374 "A"  819.0417
21375 "A"   811.375
21376 "A"  807.8333
21377 "A"  800.7083
21378 "A"  791.2917
21379 "A"       792
21380 "A"       792
21381 "A"  791.3333
21382 "A"   785.875
21383 "A"    777.25
21384 "A"    769.75
21385 "A"  761.0833
21386 "A"       757
21387 "A"       757
21388 "A"       757
21389 "A"  752.3333
21390 "A"  741.7083
21391 "A"   733.087
21392 "A"  725.1667
21393 "A"       723
21394 "A"       723
21395 "A"   719.625
21396 "A"   712.625
21397 "A"  712.2083
21398 "A"  713.2917
21399 "A"  715.1667
21400 "A"       716
21401 "A"       716
21402 "A"  714.2917
21403 "A"  707.1667
21404 "A"  699.7826
21406 "A"    723.92
end
format %td date
I have read through forums and the help drop and I can't find a code that will remove observations within a range if it doesn't have the full range of dates.

I would like to say a big thank you in advance!

Best regards

Mathias Sorensen