Dear All,
I am currently working on a project, in which I want to calculate abnormal returns for a 1 year rolling portfolio of firms that have made a repurchase announcement
the last 12 months based on their market value. So, I want to put each firm in a size quantile based on its market value regarding the market value of all firms in CRSP
dataset in that particular month. As a first step I go to the CRSP full sample dataset and I put each firm to a quantile.
I use the following code:
gen MONTH = mofd(date)
ssc install egenmore
egen quants= xtile(market_val ), by(MONTH) nq(5)
My question is how can I put my portfolio firms to the full sample quantiles.
I thought to exctract centiles in each month for the full sample, however centile does not work with by.
Thank you very much for your time and attention!!
Kind regards,
Ioannis Efraimidis
I am currently working on a project, in which I want to calculate abnormal returns for a 1 year rolling portfolio of firms that have made a repurchase announcement
the last 12 months based on their market value. So, I want to put each firm in a size quantile based on its market value regarding the market value of all firms in CRSP
dataset in that particular month. As a first step I go to the CRSP full sample dataset and I put each firm to a quantile.
I use the following code:
gen MONTH = mofd(date)
ssc install egenmore
egen quants= xtile(market_val ), by(MONTH) nq(5)
My question is how can I put my portfolio firms to the full sample quantiles.
I thought to exctract centiles in each month for the full sample, however centile does not work with by.
Thank you very much for your time and attention!!
Kind regards,
Ioannis Efraimidis
Comment