Set A Set A Set A Set B Set B Set C Set C Set C Set C Permno Date Rtrn Permno date Permno Date Rtrn event_date 11061 20110531 0.115225 10909 20120701 11061 20110531 0.115225 -2 11061 20120531 0.101424 11061 20130820 11061 20120531 0.101424 -1 11061 20130531 0.114746 11264 20130402 11061 20130531 0.114746 0 11061 20140531 0.11639 11308 20120813 11061 20140531 0.11639 1 11061 20150531 0.055248 12054 20130701 11061 20150531 0.055248 2 11061 20160531 0.094931 12149 20130809 11061 20160531 0.094931 3 12169 20111231 0.029143 12169 20130701 12169 20111231 0.029143 -2 12169 20121231 0.060995 12357 20120201 12169 20121231 0.060995 -1 12169 20131231 0.069918 12370 20120516 12169 20131231 0.069918 0 12169 20141231 0.150442 12169 20141231 0.150442 1 12169 20151231 0.183641 12169 20151231 0.183641 2 12169 20161231 0.152767 12169 20161231 0.152767 3 12370 20111231 0.173508 12370 20111231 0.173508 -1 12370 20121231 0.190566 12370 20121231 0.190566 0 12370 20131231 0.073573 12370 20131231 0.073573 1 12370 20141231 0.085915 12370 20141231 0.085915 2 12370 20151231 0.075433 12370 20151231 0.075433 3 12370 20161231 0.112746 12370 20161231 0.112746 4 I need help with the above data. I have two different files, Set A and Set B. I want to merge these two files as in Set C. Set B shows some event dates. In Set C, those years will be zero and after the event year there will be positive serial numbers and before that negative serial numbers. The files need to be merged based on permno and date. If you need you can only keep year(not month and day) in date variables.
... View more