Fama Macbeth Regression in Stata

Поділитися
Вставка
  • Опубліковано 1 лис 2024

КОМЕНТАРІ • 30

  • @thedatahall
    @thedatahall  10 місяців тому

    The following link contains the files used in this video:
    payhip.com/b/1RCTZ

    • @julian6706
      @julian6706 9 місяців тому

      How did you obtain the HMl and SMB factor?

    • @thedatahall
      @thedatahall  9 місяців тому

      These are made using another code, i dint explained because this video was particularly related to fama macbeth

    • @thedatahall
      @thedatahall  9 місяців тому

      Please contact me at info@thedatahall.com

    • @julian6706
      @julian6706 9 місяців тому

      @@thedatahall would you also like to make a video about these? :)

    • @thedatahall
      @thedatahall  9 місяців тому

      Yes its definitely on the to do list

  • @MiguelVanEs
    @MiguelVanEs 4 місяці тому +1

    Thanks for the video. I was wondering how you should interpret the final coefficients you obtain after running both stages? Do the coefficients represent risk premia? or rather the effect on returns?

  • @rodrigomota3369
    @rodrigomota3369 7 місяців тому

    @thedatahall Great explanation! I used the statsby command and I got the coefficients of the factors in the end but I wanted to know how can I obtain the r-squared or the adjusted r-squared in this first approach. Is it possible in the statsby approach or only in the other methods (asreg, xtfmb, etc)?

    • @thedatahall
      @thedatahall  6 місяців тому +1

      Try this command
      statsby _b _se e(r2), by(foreign): regress mpg gear turn

  • @flynndavies3544
    @flynndavies3544 6 місяців тому

    Great video, I was just wondering how you could alter the code to use Logit regressions instead?

    • @thedatahall
      @thedatahall  6 місяців тому

      You can try with statsby command, asreg will not work in this case.

  • @di150899
    @di150899 Рік тому

    Great video!

  • @arsec42
    @arsec42 7 місяців тому

    I have a question regarding the xtset command used. When I use this command it gives me an error because my symbol variable is a string variable. How could I get around this? My symbol variable is a symbol stock ticker like you have in your example

    • @thedatahall
      @thedatahall  7 місяців тому

      Use the following command to generate an encoded variable for ur ticker
      Encode ticker, gen(e_ticker)
      Then do
      Xtset e_ticker date

    • @arsec42
      @arsec42 7 місяців тому

      Thank you very much!@@thedatahall

    • @arsec42
      @arsec42 7 місяців тому

      @@thedatahall After applying this solution I encountered a different error: "repeated time values within panel". My dataset is similar to yours with stock data across a set time period. How would I get around this?

    • @thedatahall
      @thedatahall  7 місяців тому

      Are you using the fama macbeth dataset? Can u re download and follow the steps in the video. The error tells u that there are duplicate values, generally we do following to resolve it
      Duplicates drop ticker date, force

    • @arsec42
      @arsec42 7 місяців тому

      @@thedatahall I am using my own dataset. There are gaps in the Year variables. When I try to fill these using one of your other videos I also need to use xtset and get the same error. I do not quite understand how to eliminate the repeated time values error

  • @arsec42
    @arsec42 6 місяців тому

    I was wondering if its possible to use this method to analyse the risk premium for a specific risk factor through time, and see if there is a signficant risk premium present in specific time periods.
    Is there a way to do this?

    • @thedatahall
      @thedatahall  6 місяців тому

      Theoretically we can use this technique but i have to look at some paper that might have done this kind of analysis. If you have paper of this kind please share

  • @arsec42
    @arsec42 8 місяців тому

    Fantastic video!
    I have a question about the Fama-French factors used in the model.
    How did you arrive at these variables that are different for each stock? When I download the factor data from Kenneth French they only vary across time and not assets (as they are calculated by comparing portfolio's). As you said that cross-sectionally invariant data is not usable I was wondering how you managed to arrive at cross-sectionally varying data.

    • @thedatahall
      @thedatahall  8 місяців тому

      Hi, i have the similar factors as on Kenneth french's website i.e they are time varient but same for each crossection. We applied the timeseries regression for each crossection and the generated coefficients are used in step 1 i.e crossectional regression models. Please feel free to email me (info@thedatahall.com) if there is still a confusion.

  • @bilalanwar1191
    @bilalanwar1191 Рік тому

    A very good tutorial but I'm still facing a problem with functions. My results do not match. I'm not sure what Im doing wrong

    • @thedatahall
      @thedatahall  Рік тому

      What results do not match? If you can email me the .dta file and the code u used at info@thedatahall.com and i will have a look.

  • @chrisjackowski591
    @chrisjackowski591 Рік тому

    Hello, just wondering if you provide example.dta online? Thank you.

    • @thedatahall
      @thedatahall  Рік тому

      Sure, i usually add a link to the files in the description. But if in any article you do not find the link, please feel free to email me at info@thedatahall.com and i shall provide u the data and the do files.