Hello,
I want to generate a first-time and seasoned green-bond-issuer variable, following the specifications of Flammer (2021), "Corporate Green Bonds"(https://doi.org/10.1016/j.jfineco.2021.01.010).
For this, I have a panel of bonds (id) and date (tid) with the respective issuer id and the dummy variable is ESG. The tricky part is to generate a variable conditioned on id_issuer for different ids, since an issuer often has several bonds issued at the same time.
The first time-issuer variable should be a dummy variable that equals 1 if the bond issued is esg (=1) and is the first one. The seasoned variable is a dummy variable, that equals 1 if the issuer has other green bonds issued at the same time (tid), even if the bond is not esg (=0).
My data looks like this:
The data shows 3 bonds (ids= 1, 2, and 3) from two issuers (id_issuer =11, and 14). Issuer 14 becomes first-time issuer and seasoned at time (tid=30). After the maturity date of bond 3, the id_issuer is not longer a first time issuer, but the seasoned variable remains 1 if they are other green bonds issued at that time. Any clues of how to deal with it? Thank you
I want to generate a first-time and seasoned green-bond-issuer variable, following the specifications of Flammer (2021), "Corporate Green Bonds"(https://doi.org/10.1016/j.jfineco.2021.01.010).
For this, I have a panel of bonds (id) and date (tid) with the respective issuer id and the dummy variable is ESG. The tricky part is to generate a variable conditioned on id_issuer for different ids, since an issuer often has several bonds issued at the same time.
The first time-issuer variable should be a dummy variable that equals 1 if the bond issued is esg (=1) and is the first one. The seasoned variable is a dummy variable, that equals 1 if the issuer has other green bonds issued at the same time (tid), even if the bond is not esg (=0).
My data looks like this:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int(id id_issuer) byte isesg int tid 1 11 0 23 1 11 0 24 1 11 0 25 1 11 0 26 2 14 0 15 2 14 0 16 2 14 0 17 2 14 0 18 2 14 0 19 2 14 0 20 2 14 0 21 2 14 0 22 2 14 0 23 2 14 0 24 2 14 0 25 2 14 0 26 2 14 0 27 2 14 0 28 2 14 0 29 2 14 0 30 2 14 0 31 2 14 0 32 2 14 0 33 2 14 0 34 2 14 0 35 2 14 0 36 2 14 0 37 2 14 0 38 2 14 0 39 3 14 1 30 3 14 1 31 3 14 1 32 3 14 1 33 3 14 1 34 3 14 1 35 3 14 1 36 3 14 1 37 3 14 1 38 3 14 1 39 3 14 1 30 3 14 1 31 3 14 1 32 3 14 1 33 3 14 1 34 3 14 1 35 3 14 1 36 3 14 1 37 3 14 1 38 3 14 1 39
Comment