State-Space Representation/Kalman as an alternative to PCA

49 views
Skip to first unread message

Hector Herrada

unread,
Feb 26, 2014, 8:08:38 PM2/26/14
to iris-t...@googlegroups.com
Hi folks, I would like to extract a common factor from the returns of 5 equity indices. With Principal Component Analysis I get my time series of five factors and the corresponding loadings. I was wondering if I could achieve a similar outcome in IRIS. I gave it a try but got an error when estimating the loadings and could not figure out what is wrong. It would be great to have your insight. I have attached my model.

Thank you!

Hector
common_factor.model
estimate.m
data.csv

Michael Johnston

unread,
Feb 27, 2014, 4:41:25 AM2/27/14
to Hector Herrada, iris-t...@googlegroups.com
Hi Hector, 

Yes I think this is possible. The issue with the model file is that the transition equations block doesn't contain any dynamics. Writing equity1 = equity1 may be a true statement (a tautology even) but basically means that all of your coefficient matrices in the state equation are going to be zeros. If you don't want any persistence in the latent factor that's fine, but you at least need something non-zero in the leading coefficient matrix. E.g., if you write instead

equity1 = a*equity{-1} + shk

then things work. No state space singularity. You can set the AR coefficient to zero if you want, or estimate it. See attached. 

Best,

Mike







--
You received this message because you are subscribed to the Google Groups "iris-toolbox-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iris-toolbox...@googlegroups.com.
To post to this group, send email to iris-t...@googlegroups.com.
Visit this group at http://groups.google.com/group/iris-toolbox.
For more options, visit https://groups.google.com/groups/opt_out.

commonfact.zip

Hector Herrada

unread,
Feb 28, 2014, 11:03:46 AM2/28/14
to iris-t...@googlegroups.com
Hi Mike, thanks for your response. This is fantastic. 

Thanks!

Hector
Reply all
Reply to author
Forward
0 new messages