I have the daily return datasets for various companies from 1996 to 2021 (example of dataset attached below)-
input long co_code str8 co_stkdate float(bse_firm_level_return_percentage nse_firm_level_return_percentage)
11 "20081006" 0 0
11 "20081007" -9 -11
11 "20081008" -13 -12
11 "20081010" -11 -12
11 "20081013" 7 6
11 "20081014" -10 -10
11 "20081015" 9 10
11 "20081016" 14 13
11 "20081017" -20 -20
11 "20081020" -1 -1
11 "20081021" -3 0
11 "20081022" -5 -6
11 "20081023" -7 -6
11 "20081024" -13 -14
11 "20081027" -8 -10
11 "20081028" 19 20
11 "20081029" -9 -5
11 "20081031" 3 4
11 "20081103" 1 0
11 "20081104" 8 5
11 "20081105" -2 0
11 "20081106" 0 -1
11 "20081107" 14 15
11 "20081110" -3 -4
I want to drop the observations of the companies with zero returns on at least 75% of the days in the last 12 months. Kindly help me in this regard.
0 Response to Dropping Observations by using if command
Post a Comment