Ludvigson and Ng (2011) Factor Analysis of Bond Risk Premia

If you are seeking RATS code for implementing a particular technique or replicating results from a paper, post your request here. Be sure to include complete citations for any papers or books.
IRJ
Posts: 48
Joined: Wed Jan 10, 2007 1:15 am

Ludvigson and Ng (2011) Factor Analysis of Bond Risk Premia

Unread post by IRJ »

I am interested in replicating the paper by Ludvigson and Ng (2011) "A Factor Analysis of Bond Risk Premia" in the Handbook of Empirical Economics and Finance, A. Ulah and D. Giles (Eds) p.313-372, Chapman and Hall. The paper employs factor models to estimate bond risk premia.

A working version of the paper is found at: http://www.columbia.edu/~sn2294/papers/handbook-big.pdf

I am also attaching the data (and Matlab codes) of the authors (from one of the authors' website).
Attachments
Ludvigson and Ng (2011).rar
(310.76 KiB) Downloaded 823 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Ludvigson and Ng (2011) Factor Analysis of Bond Risk Pre

Unread post by TomDoan »

This reads and transforms the data (which is quite a task onto itself), and does the static factor analysis. There's an example of the dynamic factor analysis in the Martin, Hurn, Harris examples. However, I didn't see anywhere in the data set or programs where the series are classified into groups.
static.rpf
Program for static factor analysis
(2.19 KiB) Downloaded 1113 times
lndata.mat
Data file
(246.23 KiB) Downloaded 965 times
IRJ
Posts: 48
Joined: Wed Jan 10, 2007 1:15 am

Re: Ludvigson and Ng (2011) Factor Analysis of Bond Risk Pre

Unread post by IRJ »

Thank you very much Tom. This is very useful. Given that the above example didn't have much estimation (except for obtaining the factors; organizing the data is indeed a task by itself), would it be possible to have a quick replication of the Ludvigson and Ng (2009) "Macro Factors in Bond Risk Premia", Review of Financial Studies, vol 22, p. 5027-5067. This would be a very nice application of factor analysis. The paper can be found at:

http://www.columbia.edu/~sn2294/pub/rfs09.pdf

I am also attaching the data for the paper that I obtained from one of the authors' websites.

Thanks again.
Attachments
RFS2009.xls
(168.5 KiB) Downloaded 720 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Ludvigson and Ng (2011) Factor Analysis of Bond Risk Pre

Unread post by TomDoan »

Have you looked at the Martin-Hurn-Harris example?
IRJ
Posts: 48
Joined: Wed Jan 10, 2007 1:15 am

Re: Ludvigson and Ng (2011) Factor Analysis of Bond Risk Pre

Unread post by IRJ »

I've looked at example mhhp563.rpf from Martin, Hurn, Harris book. I think that Ludvigson and Ng (2009) RFS paper should be coded along these same lines. I'm waiting to acquire a copy of the Martin, Hurn and Harris book so as to look at the econometrics of that example in more detail. Thanks for your help with both Ludvigson and Ng papers.
IRJ
Posts: 48
Joined: Wed Jan 10, 2007 1:15 am

Re: Ludvigson and Ng (2011) Factor Analysis of Bond Risk Pre

Unread post by IRJ »

However, I didn't see anywhere in the data set or programs where the series are classified into groups.
I am assuming that your statement above refers to this specific part of the static.rfp code:

Code: Select all

dec vect vartype(131)
read(format=matlab,sheet="vartype") vartype
*
* Transform data as shown in the vartype array
*
dec vect[series] y(131)
do i=1,131
   if vartype(i)==0.or.vartype(i)==1
      set y(i) = i{0}
   else if vartype(i)==2
      set y(i) = i{0}-i{1}
   else if vartype(i)==3
      set y(i) = i{0}-2*i{1}+i{2}
   else if vartype(i)==4
      set y(i) = log(i{0})
   else if vartype(i)==5
      set y(i) = log(i{0})-log(i{1})
   else if vartype(i)==6
      set y(i) = log(i{0})-2*log(i{1})+log(i{2})
   else
      set y(i) = %na
end do i
*
Is this right? I can't see the matlab file being read with "read(format=matlab,sheet="vartype") vartype" anywhere in the author's zipped directory. To remedy this, I can construct the vartype vector myself as a .txt file by inputting the 131 values (between 1 and 6) corresponding to what Ludvigson and Ng describe in their appendix for each series. Is that right?

Thanks,
Post Reply