Announcement

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

  • constructing portfolio's and variables for building a factor model through Fama-Macbeth,

    Hey all!

    I am no expert in STATA, so I am having some issues with building a factor model through the Fama-Macbeth Approach in STATA for a long time.

    At the moment I have a unbalanced panel data with many firm-year observations and variables. That means that I already collected the data and to a certain extent 'cleaned' it.

    I also processed the market returns (s&p 500) and risk-free rate (1 year t-bill) data by merging my panel data set with these two variables based on year.

    But now I have to do the last things in which I have problems figuring out for a long time;

    1. Delete last row, that was 2015, but I want max. 2014, but the last row in the dataset is still there.... the very last row says - - - 0 - 0 0, or something like that.

    2. There are still a lot of missing values despite data-cleaning. I want to delete all companies (gvkey) from the dataset which has at least 1 missing value for at least 1 variable.

    3. Generate buy-and-hold stock returns for each firm-year observation, panel data starts at 1961, but I want to examine the period 1962-2014

    4. Calculating the Equity Beta (Be) which would be the estimation from stock return regressions (excess of the risk-free rate) on the total return (excess of the risk-free rate)

    5. Constructing 10 portfolio's each year by ranking al firms on bookprice, enterprise, financing, financingcomp, equity beta, inv and operatingprofit

    6. Show mean values of stock returns, bookprice, enterprise, financing, financingcomp, equity beta, inv and operatingprofit for all category of portfolio's (each category of 10 portfolio's).

    I added my Stata-file as attachment. This is the link:

    https://ufile.io/7t8s3

    NOTE: The commands are already used in the stata-file, so it is not 'fresh' anymore.

    Can anyone help me with these 6 points?

    Thanks in advance!
    Last edited by Jan Filips; 27 Apr 2017, 07:31.

  • #2
    File attachment did not work, so I dumped a link in the post.

    Comment

    Working...
    X