Dear All,

I have daily stock market data of 174 firms from 2000 to 2019 (about 4400 prices per stock). I also have the market indexes for 19 separate indexes, as this is a cross-country analysis. I have attempted to import the data into stata, from excel, and then attempted to convert this data to the long form, with the results below.

My data looks like this, from (dataex):

Code:
* Example generated by -dataex-. To install: ssc install dataex

 dataex D_Date stock daily_return
clear
input str10 D_Date str5 stock str17 daily_return
"  1/1/2003" "Co1" ""                 
"  1/1/2004" "Co1" "1947.63"          
"  1/1/2007" "Co1" "5916.02"          
"  1/1/2008" "Co1" "6095.83"          
"  1/1/2009" "Co1" "2425.31"          
"  1/1/2010" "Co1" "3607.04"          
"  1/1/2013" "Co1" "3802.48"          
"  1/1/2014" "Co1" "4151.77"          
"  1/1/2015" "Co1" "3610.1"           
"  1/1/2016" "Co1" "4085.84"          
"  1/1/2018" "Co1" "6158.6"           
"  1/1/2019" "Co1" "5084.71"          
"  1/2/2003" "Co1" ""                 
"  1/2/2004" "Co1" "1977.54"          
"  1/2/2006" "Co1" "4797.02"          
"  1/2/2007" "Co1" "6042.59"          
"  1/2/2008" "Co1" "6090.77"          
"  1/2/2009" "Co1" "2510.8"           
"  1/2/2012" "Co1" "2973.79"          
"  1/2/2013" "Co1" "3921.28"          
"  1/2/2014" "Co1" "4130.940000000001"
"  1/2/2015" "Co1" "3661.88"          
"  1/2/2017" "Co1" "4659.3"           
"  1/2/2018" "Co1" "6202.12"          
"  1/2/2019" "Co1" "5131.13"          
"  1/3/2003" "Co1" ""                 
"  1/3/2005" "Co1" "3143.99"          
"  1/3/2006" "Co1" "4842.7"           
"  1/3/2007" "Co1" "6051.79"          
"  1/3/2008" "Co1" "6033"             
"  1/3/2011" "Co1" "4390.29"          
"  1/3/2012" "Co1" "3000.02"          
"  1/3/2013" "Co1" "3938.14"          
"  1/3/2014" "Co1" "4162.91"          
"  1/3/2017" "Co1" "4712.08"          
"  1/3/2018" "Co1" "6279.7"           
"  1/3/2019" "Co1" "5132.25"          
"  1/4/2005" "Co1" "3167.22"          
"  1/4/2006" "Co1" "4903.25"          
"  1/4/2007" "Co1" "5984.54"          
"  1/4/2008" "Co1" "5887.63"          
"  1/4/2010" "Co1" "3666.94"          
"  1/4/2011" "Co1" "4369.51"          
"  1/4/2012" "Co1" "2969.71"          
"  1/4/2013" "Co1" "3932.07"          
"  1/4/2016" "Co1" "4002.94"          
"  1/4/2017" "Co1" "4707.91"          
"  1/4/2018" "Co1" "6401.52"          
"  1/4/2019" "Co1" "5293.43"          
"  1/5/2004" "Co1" "2015.32"          
"  1/5/2005" "Co1" "3137.83"          
"  1/5/2006" "Co1" "4914.440000000001"
"  1/5/2007" "Co1" "5860.46"          
"  1/5/2009" "Co1" "2534.2"           
"  1/5/2010" "Co1" "3748.82"          
"  1/5/2011" "Co1" "4283.28"          
"  1/5/2012" "Co1" "2897.42"          
"  1/5/2015" "Co1" "3557.63"          
"  1/5/2016" "Co1" "4027.53"          
"  1/5/2017" "Co1" "4731.89"          
"  1/5/2018" "Co1" "6394.02"          
"  1/6/2003" "Co1" ""                 
"  1/6/2004" "Co1" "2015.32"          
"  1/6/2005" "Co1" "3137.83"          
"  1/6/2006" "Co1" "4914.440000000001"
"  1/6/2009" "Co1" "2534.2"           
"  1/6/2010" "Co1" "3748.82"          
"  1/6/2011" "Co1" "4283.28"          
"  1/6/2012" "Co1" "2897.42"          
"  1/6/2014" "Co1" "4162.91"          
"  1/6/2015" "Co1" "3557.63"          
"  1/6/2016" "Co1" "4027.53"          
"  1/6/2017" "Co1" "4731.89"          
"  1/7/2003" "Co1" ""                 
"  1/7/2004" "Co1" "2031.12"          
"  1/7/2005" "Co1" "3173.95"          
"  1/7/2008" "Co1" "5851.84"          
"  1/7/2009" "Co1" "2631.09"          
"  1/7/2010" "Co1" "3744.43"          
"  1/7/2011" "Co1" "4309.83"          
"  1/7/2013" "Co1" "3933.59"          
"  1/7/2014" "Co1" "4287.97"          
"  1/7/2015" "Co1" "3573.88"          
"  1/7/2016" "Co1" "3916.55"          
"  1/7/2019" "Co1" "5357.7"           
"  1/8/2003" "Co1" ""                 
"  1/8/2004" "Co1" "2056.84"          
"  1/8/2007" "Co1" "5807.37"          
"  1/8/2008" "Co1" "5907.91"          
"  1/8/2009" "Co1" "2589.72"          
"  1/8/2010" "Co1" "3741.35"          
"  1/8/2013" "Co1" "3929.04"          
"  1/8/2014" "Co1" "4351.91"          
"  1/8/2015" "Co1" "3626.56"          
"  1/8/2016" "Co1" "3786.08"          
"  1/8/2018" "Co1" "6392.610000000001"
"  1/8/2019" "Co1" "5361.12"          
"  1/9/2003" "Co1" ""                 
"  1/9/2004" "Co1" "2051.39"          
"  1/9/2006" "Co1" "4970.45"          
end

I need to present this data in a format from which i can calculate returns, abnormal returns and the CAR for an event study.

Can anyone help with the way i am presenting my data? I apologise if this is not in a correct format but i am very new and have tried my best.

Any help with this issue would be greatly appreciated.

Callum