Hi,
I am currently doing a research project for university. We want to research the effect of the ESG dimensions on the M&A premiums. On one dataset, we have the data of the different deals over the years (in this small sample only 2013):
And on the other dataset we have the ESG scores over the years:
Is it possible to get the closest date to the announcement date and then get the scores of the 3 dimensions? To make my question clear, this is what I'm trying to achieve for for example the JPM deal (first one of the first sample). The announcement date of the JPM deal is 12-Feb-2019. I want Stata to search for the closest date in the ESG dataset, but it has to be before the announcement date, so in this example the data of 17/1/2018. Then the result would be as following:
Is this feasible in Stata? I'm aware that I might have to transpose the second dataset in order to be able to merge the two datasets.
Thanks.
I am currently doing a research project for university. We want to research the effect of the ESG dimensions on the M&A premiums. On one dataset, we have the data of the different deals over the years (in this small sample only 2013):
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str9 dealid str8 targetticker str5 acquirerticker str11 announcementdate float transactionvaluemm "3101704MM" "PTXTQ" "JPM" "12-Feb-2019" 302.95 "3091671MM" "IMDZ" "MRK" "21-Feb-2019" 187.05 "3094709MM" "WP" "FIS" "18-Mar-2019" 42607.66 "3096046MM" "QTNA" "ON" "27-Mar-2019" 809.83 "3096392MM" "SRMC" "MSA" "29-Mar-2019" 32.3 "3096796MM" "APU" "UGI" "02-Apr-2019" 5250.03 "3098596MM" "ADSW" "WM" "15-Apr-2019" 4662.77 "3099451MM" "KEYW" "J" "22-Apr-2019" 878.71 "3098661MM" "APC" "OXY" "24-Apr-2019" 54085.73 "3100112MM" "PETX" "ELAN" "26-Apr-2019" 211.05 "3101209MM" "AMPY" "MPO" "06-May-2019" 516.12 "3101549MM" "ANDX" "MPLX" "08-May-2019" 14270.49 "3102791MM" "CRAY" "HPE" "17-May-2019" 1288.81 "3105580MM" "RTN" "UTX" "09-Jun-2019" 89727.25 "3105732MM" "DATA" "CRM" "10-Jun-2019" 14772.19 "3106138MM" "TST" "MVEN" "12-Jun-2019" 20.61 "3106689MM" "ARRY" "PFE" "17-Jun-2019" 10421.35 "3106683MM" "CJ" "FRAC" "17-Jun-2019" 680.83 "3107212MM" "ONSE" "WLDN" "19-Jun-2019" 24.91 end
And on the other dataset we have the ESG scores over the years:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str10 scoredate str29 aspectname byte scorevalue str5 ticker "28/1/2022" "Social Dimension" 49 "JPM" "17/1/2018" "Social Dimension" 39 "JPM" "18/12/2020" "Social Dimension" 34 "JPM" "10/9/2015" "Environmental Dimension" 70 "JPM" "7/9/2017" "Environmental Dimension" 63 "JPM" "28/1/2022" "S&P Global ESG Score" 40 "JPM" "7/9/2017" "Economic Governance Dimension" 62 "JPM" "12/11/2021" "Environmental Dimension" 55 "JPM" "8/9/2016" "Environmental Dimension" 67 "JPM" "11/9/2014" "Economic Governance Dimension" 67 "JPM" "13/11/2020" "Social Dimension" 48 "JPM" "13/9/2019" "Social Dimension" 46 "JPM" "10/9/2015" "Economic Governance Dimension" 61 "JPM" "12/9/2013" "Social Dimension" 51 "JPM" "17/1/2018" "S&P Global ESG Score" 59 "JPM" "18/12/2020" "Social Dimension" 48 "JPM" "10/9/2015" "S&P Global ESG Score" 61 "JPM" "23/9/2022" "Environmental Dimension" 44 "JPM" "13/9/2019" "S&P Global ESG Score" 51 "JPM" "11/9/2014" "S&P Global ESG Score" 62 "JPM" "13/11/2020" "S&P Global ESG Score" 53 "JPM" "12/9/2013" "S&P Global ESG Score" 62 "JPM" "7/9/2017" "Economic Governance Dimension" 57 "JPM" "8/9/2016" "S&P Global ESG Score" 58 "JPM" "17/1/2018" "Economic Governance Dimension" 55 "JPM" "13/9/2018" "Economic Governance Dimension" 60 "JPM" "7/9/2017" "Social Dimension" 39 "JPM" "13/9/2019" "Economic Governance Dimension" 38 "JPM" "17/1/2018" "Economic Governance Dimension" 62 "JPM" "13/9/2019" "Environmental Dimension" 49 "JPM" "13/11/2020" "Environmental Dimension" 60 "JPM" "28/1/2022" "Environmental Dimension" 55 "JPM" "10/9/2015" "Social Dimension" 44 "JPM" "23/9/2022" "Social Dimension" 33 "JPM" "17/1/2018" "Environmental Dimension" 63 "JPM" "12/11/2021" "Economic Governance Dimension" 55 "JPM" "18/12/2020" "Environmental Dimension" 60 "JPM" "28/1/2022" "Economic Governance Dimension" 45 "JPM" "7/9/2017" "S&P Global ESG Score" 59 "JPM" "13/9/2018" "Environmental Dimension" 60 "JPM" end
Is it possible to get the closest date to the announcement date and then get the scores of the 3 dimensions? To make my question clear, this is what I'm trying to achieve for for example the JPM deal (first one of the first sample). The announcement date of the JPM deal is 12-Feb-2019. I want Stata to search for the closest date in the ESG dataset, but it has to be before the announcement date, so in this example the data of 17/1/2018. Then the result would be as following:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str9 dealid str8 targetticker str5 acquirerticker str11 announcementdate float transactionvaluemm closest_date env_score social_score gov_score "3101704MM" "PTXTQ" "JPM" "12-Feb-2019" 302.95 "17-Jan-2018" 63 39 62 end
Thanks.
Comment