Announcement

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

  • Fama-MacBeth with Fama French Portfolios

    I have never used Stata before and have been trying to test the Fama and French three-factor model in order to get comfortable with the software. Running Fama-MacBeth with the 25 FF portfolios as test assets is a standard procedure in the asset pricing literature, the FF model is of no particular interest to me.
    I downloaded the fm .ado file from Petersen's website and ran a test using the test data set he put up. I had no issues. I have also tried using xtfmb.
    The issue I am having with the FF portfolios is that when I combine the factor data with the portfolio data, this is what I get (just a subset of the portfolios are presented below):
    Date MKtRf HML SMB
    SMALL LoBM
    ME1 BM2
    ME1 BM3
    200010
    -0.0276
    -0.0367
    0.047
    -0.1204
    -0.0934
    -0.038
    I understand that I need to define a panel variable with tsset and the portfolio sorts represent the panel variable. However, I have not been able to reorganise the data in a way that would allow me to execute fm.ado/xtfmb. The way it stands, I am looking at multiple dependent variables that are regressed against the same set of independent variables. I tried stacking the portfolio data vertically and copying the factor variables and date 25 times but I obtained 0 estimates for all slope variables with omitted standard errors (I understand why this happened).My question is: How do I modify the data in a way that would allow me to execute fm.ado?

    Thank you,
    Denis
    .
    Last edited by Denis Mokanov; 27 Jun 2016, 04:12.

  • #2
    Denis, without seeing your data, it would be hard for us to visualize your problem and suggest a solution. If the problem is that you cannot declare your data set as panel data, then for each portfolio, there must be a numerical identifier, say its name is port, then you can use the tsset command to declare your data as panel data.
    Code:
    tsset port Date
    However, if your problem is more complicated than this, you might be interested in more customized help, then see http://www.opendoors.pk/home/paid-he...irical-finance
    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment


    • #3
      Thanks for the response but I am still not seeing it. Do I create a new variable named "port" which takes on value between 1 and 25 and number the FF portfolios 1-25 without reorganising the data? This was the first thing I tried and I kept getting the no observations error. My data is simply the FF portfolio and factor returns from French's website (the mktrf, hml, and smb are the factors and smalllobm, me1bm2 etc. are three of the 25 FF portfolios, which are pretty much the standard test assets).

      Comment


      • #4
        Welcome to Statalist!

        I think I see the problem. Do the variables MktRf, HML, ... correspond to your portfolios? If so, read on.

        Your data is organized in what is known as a "wide" layout - one observation per time period, with each of your portfolios occupying a separate variable. What is expected for panel data is a "long" layout, with one observation for each portfolio in each time period. The experienced users here generally agree that, with few exceptions, Stata makes it much more straightforward to accomplish complex analyses using a long layout of your data rather than a wide layout of the same data. And in this case, it seems to be mandatory.

        The key to transforming your data from wide to long is the reshape command. You should start by reading Stata's output for help reshape.
        But as a new user of Stata, you're diving into the deep end of the pool with what you are attempting to do. Even if you have a background with other econometric or statistical packages, each package has its unique approach that requires getting an understanding of. I'm sympathetic to you as a new user of Stata - it's a lot to absorb. And even worse if perhaps you are under pressure to produce some output quickly. Nevertheless, I'd like to encourage you to take a step back from your immediate tasks.

        When I began using Stata in a serious way, I started, as have others here, by reading my way through the Getting Started with Stata manual relevant to my setup. Chapter 18 then gives suggested further reading, much of which is in the Stata User's Guide, and I worked my way through much of that reading as well. There are a lot of examples to copy and paste into Stata's do-file editor to run yourself, and better yet, to experiment with changing the options to see how the results change.

        All of these manuals are included as PDFs in the Stata installation (since version 11) and are accessible from within Stata - for example, through the PDF Documentation section of Stata's Help menu. The objective in doing the reading was not so much to master Stata as to be sure I'd become familiar with a wide variety of important basic techniques, so that when the time came that I needed them, I might recall their existence, if not the full syntax.

        The Stata documentation is really exemplary - there's just a lot of it. The path I followed surfaces the things you need to know to get started in a hurry.
        If after familiarizing yourself with the documentation for reshape you need further assistance, I'd suggest starting a new topic with a title that doesn't scare away the non-econometricians.

        Before doing so, please review the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post, looking especially at sections 9-12 on how to best pose your question. It would be particularly helpful to post a small hand-made example, perhaps with just a few of your portfolios and observations, showing the data before the process and how you expect it to look after the process. In particular, please read FAQ #12 and use dataex and CODE delimiters when posting to Statalist.

        Comment

        Working...
        X