Out-of-sample PCs

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

kpukthua
Posts: 13
Joined: Mon Feb 16, 2009 9:19 am

Out-of-sample PCs

Postby kpukthua » Sun Nov 07, 2010 4:48 am

Hi,

I have a problem that I can't solve.

Using the data from year t-1, I'd like to estimate eigenvectors and sorted from the largest to smallest eigenvalue. Then, I need to estimate principal components from returns in the subsequent calendar year (or year t). In other words, the weightings (eigenvectors) computed from the 1973 covariance matrix are applied to the returns of the same countries during 1974. I'd like to follow the same routine in each calendar year; weightings from 1974 used with returns from 1975 and so on until the end of the data.

Do you know how I can write a program to do that? Eviews has a PC built-in function but it seems to construct PCs based on eigenvectors and eigenvalue estimated from the same year.

Enclosed are the time-series of stock returns across European countries from Jan 1973-Feb 1985 that I need to estimate out-of-sample PCs mentioned above. I really have no clue how to do it.

Any help will be appreciated very much. Thanks.
Attachments
build a pc2.wf1
(902.09 KiB) Downloaded 200 times

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 28 guests