Hello Statalisters,
I am conducting an event study on the effects of corporte announcements on their stock performance, using the command -estudy-. However, I am receiving the error message that the event dates must be 8 characters long and I am unable to resolve it. Both the variables "event_dates" & "LSE_date" are in the format "02jan2020". Is having leading zeros in the dates causing the problem?
I have tried to generate another variable using the command - generate ev_dates = date(event_dates, "DMY")- and received the error message "type mismatch".
Kindly advise. A sample of the data is appended below for your kind reference.
Thank you in advance.
Warm regards,
Avik
I am conducting an event study on the effects of corporte announcements on their stock performance, using the command -estudy-. However, I am receiving the error message that the event dates must be 8 characters long and I am unable to resolve it. Both the variables "event_dates" & "LSE_date" are in the format "02jan2020". Is having leading zeros in the dates causing the problem?
I have tried to generate another variable using the command - generate ev_dates = date(event_dates, "DMY")- and received the error message "type mismatch".
Kindly advise. A sample of the data is appended below for your kind reference.
Thank you in advance.
Warm regards,
Avik
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str33 coname float(event_dates LSE_date) str18(ret_va ret_evraz) "EVRAZ plc" 21992 21916 "NA" "NA" "Pershing Square Holdings, Ltd" 21999 21917 "-.1085959650756469" "-.0066768260790529" "The Adani Group" 22004 21920 "-.0528105781142397" "-.1267681888052156" "Las Vegas Sands Corp" 22005 21921 "-.1166313672563816" "-.0723810904732514" "Vedanta Group " 21997 21922 "-.1724979376807987" "-.1470534273387057" "Reliance Industries" 22004 21923 ".0617740227645852" ".0605486514961259" "Carnival Corp" 21993 21924 "-.2097886068185771" ".0020238824715611" "LVMH" 22197 21927 ".0610690333488214" "-.1954277325424515" "Microsoft" 21990 21928 "-.1813741384379146" ".1176738185015968" "Salesforce" 21991 21929 "-.0066508558699097" ".0614469895024022" "Mediaset" 21990 21930 ".0681663463421461" ".025964923151377" "Prada" 22007 21931 ".1440502295780008" "-.080009322834607" "Amazon" 21997 21934 ".2297523512076085" "-.0940961521751738" "WorkDay " 22012 21935 "-.0198026272961798" ".0672754366490436" "Apollo Global Management" 21994 21936 ".0641477612071031" "-.0658465105017889" "The Home Depot" 22001 21937 "-.1036685193693863" ".1822422215851693" "Columbia Sportswear " 21997 21938 "-.0411471449051716" ".0086888262312108" "Virgin Atlantic " 22104 21941 ".0013540963477292" "-.0150557637002445" "Berkshire Hathaway" 22022 21942 "-.1055108802923476" "-.043236775689692" "Charoen Pokphand Group" 22012 21943 "-.0258963443035795" "-.0565946005550923" "New World Development Group" 22004 21944 "-.0612517474309486" ".0213842273254405" "Intuit" 22042 21945 ".1596435937726815" "-.0235922211861551" "Dangote Cement" 22006 21948 "" "" "EssilorLuxottica" 22011 21949 "" "" "Tod's S.p.A." 22008 21950 "" "" "Dell Technologies" 22497 21951 "" "" "Expedia Group" 21993 21952 "" "" "Banca Mediolanum" 22012 21955 "" "" "Twitter" 22013 21956 "" "" "Fortescue Metals Group" 21990 21957 "" "" "Campari Group" 21950 21958 "" "" "Netflix" 22022 21959 "" "" "Evergrande Group" 21969 21962 "" "" "JSW Group" 22004 21963 "" "" "Bok Financial" 22019 21964 "" "" "Nike" 22008 21965 "" "" "Kotak Mahindra Bank" 22004 21966 "" "" "KKR & Co" 22012 21969 "" "" "Estée Lauder " 21997 21970 "" "" "Ralph Lauren" 22000 21971 "" "" "Caltagirone SpA" 21990 21972 "" "" "CK Hutchison Holdings Limited" 21962 21973 "" "" "Nine Dragons Paper" 21970 21976 "" "" "Alibaba" 21987 21977 "" "" "Mahindra & Mahindra" 21997 21978 "" "" "L'Oréal" 21992 21979 "" "" "Tesla" 22028 21980 "" "" "Saras" 21970 21983 "" "" "African Rainbow Minerals" 22001 21984 "" "" "Anglo American plc" 21997 21985 "" "" "Richemont" 21997 21986 "" "" "Inditex" 21992 21987 "" "" "Kering " 21997 21990 "" "" "Norilsk Nickel" 21997 21991 "" "" "Wipro" 22008 21992 "" "" "BUA Cement" 22001 21993 "" "" "Magnitogorsk Iron and Steel Works" 21997 21994 "" "" "Comcast" 22006 21997 "" "" "Moncler" 21991 21998 "" "" "Orascom Investment Holding SAE" 22010 21999 "" "" "Regeneron" 22006 22000 "" "" "Starbucks" 21980 22001 "" "" "Charles Schwab Corporation" 21993 22004 "" "" "eBay" 22029 22005 "" "" "SoftBank" 21986 22006 "" "" "NantHealth Inc." 22048 22007 "" "" "Blackstone " 22011 22008 "" "" "Stryker Corporation" 21994 22011 "" "" "SM Prime Holdings" 21991 22012 "" "" "Walmart" 21991 22013 "" "" "Bath & Body Works Inc." 22001 22014 "" "" "Fast Retailing" 22000 22019 "" "" "Zoom Video Tech" 21987 22020 "" "" "Facebook" 21991 22021 "" "" "" . 22022 "" "" "" . 22025 "" "" "" . 22026 "" "" "" . 22027 "" "" "" . 22028 "" "" "" . 22029 "" "" "" . 22032 "" "" "" . 22033 "" "" "" . 22034 "" "" "" . 22035 "" "" "" . 22036 "" "" "" . 22039 "" "" "" . 22040 "" "" "" . 22041 "" "" "" . 22042 "" "" "" . 22046 "" "" "" . 22047 "" "" "" . 22048 "" "" "" . 22049 "" "" "" . 22050 "" "" "" . 22053 "" "" "" . 22054 "" "" "" . 22055 "" "" "" . 22056 "" "" "" . 22057 "" "" "" . 22061 "" "" end format %td event_dates format %td LSE_date

Comment