Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • times series data merge

    Hi

    I have 2 files that I want to merge and I want to create time-series data.

    I have one file with information on separate M&A Transactions with a TICKER as ID for each transaction. I want to use the ticker to merge with :

    ----------------------- copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float index str1118 ticker int Announceddate
     1 "VZ"   19603
     2 "T"    20749
     3 "DIS"  21355
     4 "CVS"  21156
     5 "KMI"  19945
     6 "T"    19861
     8 "DOW"  20433
    10 "XOM"  18245
    11 "KHC"  20172
    12 "S"    19519
    12 "S"    19519
    13 "KMI"  18916
    16 "IBM"  21485
    19 "ESRX" 18829
    19 "ESRX" 18829
    20 "RAI"  19919
    20 "RAI"  19919
    20 "RAI"  19919
    20 "RAI"  19919
    20 "RAI"  19919
    22 "MSFT" 20618
    24 "BDX"  20932
    26 "RTX"  21514
    27 "WPZ"  20022
    29 "ETP"  20779
    end
    format %tdnn/dd/CCYY Announceddate
    ------------------ copy up to and including the previous line ------------------


    my other file is a daily returns file from WRDS which contains daily returns for the tickers:

    ----------------------- copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long date str8 ticker double RET
    18266 "ORCL"    .013045238330960274
    18267 "ORCL"  -.0012072711251676083
    18268 "ORCL"   -.014504456892609596
    18269 "ORCL"   -.003270643064752221
    18270 "ORCL"    .012305215932428837
    18273 "ORCL"   .0004051956639159471
    18274 "ORCL"   -.005265332758426666
    18275 "ORCL"    .009771977551281452
    18276 "ORCL"    .023790359497070313
    18277 "ORCL"   -.003946344833821058
    18281 "ORCL"    .003565774764865637
    18282 "ORCL"   -.010659315623342991
    18283 "ORCL"   -.009177954867482185
    18284 "ORCL"   -.027386238798499107
    18287 "ORCL"   -.004968899767845869
    18288 "ORCL"   -.006242260802537203
    18289 "ORCL"   -.000837460276670754
    18290 "ORCL"   -.016345402225852013
    18291 "ORCL"   -.017469104379415512
    18294 "ORCL"    .006938415113836527
    18295 "ORCL"    .023255854845046997
    18296 "ORCL" -.00042088504415005445
    18297 "ORCL"   -.026947341859340668
    18298 "ORCL"    .019039316102862358
    18301 "ORCL"     -.0182589553296566
    end
    format %td date
    ------------------ copy up to and including the previous line ------------------

    I want to create time-series data where I have one row of all the M&A information and then multiple rows for all the daily returns data.

    Thanks in advance

Working...
X