I am trying to replicate and extend their study. In my model, I am trying to identify 4 unobserved factors. The 4 factors are mkt, size , btm and sentiment. My dependent variables are returns on 6 size and BTM sorted portfolios (Rsl, Rsm, Rsh, Rbl, Rbm, Rbh). Following He, Huh and Lee (2010), in order to identify mkt , size and btm, I imposed the same restrictions as they did in the paper. I allowed Mkt to have different effects on the 6 portfolios but, size to have the same effect on portfolios from the same class, big or small class, and btm to have the identical effect on portfolios from the same class, high, medium or low class. In order to identify sentiment factor, I imposed gamma1 to be 1. All the unobserved factors are assumed to follow a AR(1) process and sentiment is affected by dummy variables (yr34 and demo) . However, the estimated results seem to suffer from no convergence issue as the program indicates no convergence in 100 iterations. My understanding is that the no convergence means that either the model specification is problematic or the initial values I assigned are problematic. After many tries, I am not sure what my problem is. My code is attached so you can see what I have done so far. Any suggestion from you are highly appreciated
Code: Select all
nonlin beta1 beta2 beta3 beta4 beta5 beta6 $
beta7 beta8 beta9 beta7=beta8=beta9 $
beta10 beta11 beta12 beta10=beta11=beta12 $
beta13 beta14 beta15 beta16 beta17 beta18 beta13=beta16 beta14=beta17 beta15=beta18 $
alpha1 alpha2 alpha3 alpha4 alpha5 alpha6 alpha7 alpha8 alpha9 $
garma1=1.0 garma2 garma3 garma4 garma5 garma6 garma7 garma8 garma9 $
sigsl sigsm sigsh sigbl sigbm sigbh sigmktrf sigsmb sighml sigdi sigdf sigterm $
psi1 psi2 psi3 psi4 dummy1 dummy2 dummy2=-dummy1*psi4 dummy3 dummy4 dummy4=-dummy3*psi4 $
sigmkt sigsize sigbtm sigsenti
dec frml[rect] cf
frml cf = ||beta1,beta2,beta3,beta4,beta5,beta6,1.0,0.0,0.0,alpha1,alpha2,alpha3|$
beta7,beta8,beta9,beta10,beta11,beta12,0.0,1.0,0.0,alpha4,alpha5,alpha6|$
beta13,beta14,beta15,beta16,beta17,beta18,0.0,0.0,1.0,alpha7,alpha8,alpha9|$
garma1,garma2,garma3,garma4,garma5,garma6,garma7,garma8,garma9,0.0,0.0,0.0||
linreg sl
# constant mktrf smb hml sentindex
compute beta1=%beta(2),beta7=%beta(3),beta13=%beta(4),garma1=%beta(5),sigsl=sqrt(%seesq)
linreg sm
# constant mktrf smb hml sentindex
compute beta2=%beta(2),beta8=%beta(3),beta14=%beta(4),garma2=%beta(5),sigsm=sqrt(%seesq)
linreg sh
# constant mktrf smb hml sentindex
compute beta3=%beta(2),beta9=%beta(3),beta15=%beta(4),garma3=%beta(5),sigsh=sqrt(%seesq)
linreg bl
# constant mktrf smb hml sentindex
compute beta4=%beta(2),beta10=%beta(3),beta16=%beta(4),garma4=%beta(5),sigbl=sqrt(%seesq)
linreg bm
# constant mktrf smb hml sentindex
compute beta5=%beta(2),beta11=%beta(3),beta17=%beta(4),garma5=%beta(5),sigbm=sqrt(%seesq)
linreg bh
# constant mktrf smb hml sentindex
compute beta6=%beta(2),beta12=%beta(3),beta18=%beta(4),garma6=%beta(5),sigbh=sqrt(%seesq)
linreg mktrf
# constant sentindex
compute garma7=%beta(2),sigmktrf=(%seesq)
linreg smb
# constant sentindex
compute garma8=%beta(2),sigsmb=(%seesq)
linreg hml
# constant sentindex
compute garma9=%beta(2),sighml=(%seesq)
linreg dyield1
#constant mktrf smb hml sentindex
compute alpha1=%beta(2),alpha4=%beta(3),alpha7=%beta(4),sigdi=sqrt(%seesq)
linreg default
#constant mktrf smb hml sentindex
compute alpha2=%beta(2),alpha5=%beta(3),alpha8=%beta(4),sigdf=sqrt(%seesq)
linreg term
#constant mktrf smb hml sentindex
compute alpha3=%beta(2),alpha6=%beta(3),alpha9=%beta(4),sigterm=sqrt(%seesq)
dec frml[symm] svf
frml svf = %diag(||sigsl^2,sigsm^2,sigsh^2,sigbl^2,sigbm^2,sigbh^2,sigmktrf^2,sigsmb^2,sighml^2,sigdi^2,sigdf^2,sigterm^2||)
dec frml[vect] zf
frml zf = ||0.0,0.0,0.0,dummy1*yr34+dummy2*yr34{1}+dummy3*demo+dummy4*demo{1}||
dec frml[rect] af
frml af = ||psi1,0.0,0.0,0.0|$
0.0,psi2,0.0,0.0|$
0.0,0.0,psi3,0.0|$
0.0,0.0,0.0,psi4||
linreg mktrf
# constant mktrf{1}
compute psi1=%beta(2),sigmkt=sqrt(%seesq)
linreg smb
# constant smb{1}
compute psi2=%beta(2),sigsize=sqrt(%seesq)
linreg hml
# constant hml{1}
compute psi3=%beta(2),sigbtm=sqrt(%seesq)
linreg sentindex
# constant sentindex{1} yr34 demo
compute psi4=%beta(2),dummy1=%beta(3),dummy3=%beta(4),sigsenti=sqrt(%seesq)
dec frml[symm] swf
frml swf =%diag(||sigmkt^2,sigsize^2,sigbtm^2,sigsenti^2||)
compute [rect] f=%identity(4)
dlm(presample=ergodic,a=af,c=cf,z=zf,f=f,sv=svf,sw=swf,y=||sl,sm,sh,bl,bm,bh,Mktrf,SMB,HML,dyield,Default,Term||,method=bfgs,type=filter)