Hi,
I have quite a complicated question.
I have a sample of returns for 68 countries from 1/1/2002 to 31/12/2005.
I've written a program to generate an equation for these countries
for %r land1 land2 land3 land5 land6 land7 land8 land9 land10 land11 land13 land14 land15 land16 land17 land18 land19 land20 land21 land22 land23 land24 land25 land26 land27 land28 land29 land30 land31 land32 land33 land34 land35 land36 land37 land38 land39 land40 land41 land42 land43 land44 land45 land46 land47 land48 land49 land50 land51 land52 land53 land54 land55 land56 land57 land58 land59 land60 land61 land62 land63 land64 land65 land66 land67 land68
equation eq{%r}.arch {%r} c rwmp rwmp(-1) rwmp(-2) rwmp(-3) rwmp(-4) rwmp(-5) rhml rhml(-1) rhml(-2) rhml(-3) rhml(-4) rhml(-5) rsmb rsmb(-1) rsmb(-2) rsmb(-3) rsmb(-4) rsmb(-5) {%r}(-1) {%r}(-2) {%r}(-3) {%r}(-4) {%r}(-5) year2003 year2004 year2005 month2 month3 month4 month5 month6 month7 month8 month9 month10 month11 month12 day2 day3 day4 day5
...
next
Don't worry too much about the equation, but what I would like to do now, is to make a static forecast for the expected returns on March 11, 2004(attack in Madrid), based on the known returns from t=-230 until t=-30 (a month before the attack). Then, based on the known return on March,11 and the expected return, I can calculate the AR on March 11,2004. Can somebody help me? Should I adjust the sample before I run the program? What steps should I take? I am sorry for the complicated question, I can upload the files if that could help.
Tnx!
Static forecasting
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Static forecasting
Set the sample inside the loop prior to estimation, then set it again prior to forecasting.
Follow us on Twitter @IHSEViews
Re: Static forecasting
Can you forecast using a command within the program or should you do it manually for each country seperatly afterwards? Based on the sample of 25/4/2003 until 29/1/2004, it should forecast for the sample from 30/1/2004 until 31/12/2005.
for
%r land1 land2 land3 land5 land6 land7 land8 land9 land10 land11 land13 land14 land15 land16 land17 land18 land19 land20 land21 land22 land23 land24 land25 land26 land27 land28 land29 land30 land31 land32 land33 land34 land35 land36 land37 land38 land39 land40 land41 land42 land43 land44 land45 land46 land47 land48 land49 land50 land51 land52 land53 land54 land55 land56 land57 land58 land59 land60 land61 land62 land63 land64 land65 land66 land67 land68
smpl 25/4/2003 29/1/2004
equation eq{%r}.arch {%r} c rwmp rwmp(-1) rwmp(-2) rwmp(-3) rwmp(-4) rwmp(-5) rhml rhml(-1) rhml(-2) rhml(-3) rhml(-4) rhml(-5) rsmb rsmb(-1) rsmb(-2) rsmb(-3) rsmb(-4) rsmb(-5) {%r}(-1) {%r}(-2) {%r}(-3) {%r}(-4) {%r}(-5) year2003 year2004 year2005 month2 month3 month4 month5 month6 month7 month8 month9 month10 month11 month12 day2 day3 day4 day5
next
Thank you gareth, I'm sorry I bother you with all of my questions
Kind regards
for
%r land1 land2 land3 land5 land6 land7 land8 land9 land10 land11 land13 land14 land15 land16 land17 land18 land19 land20 land21 land22 land23 land24 land25 land26 land27 land28 land29 land30 land31 land32 land33 land34 land35 land36 land37 land38 land39 land40 land41 land42 land43 land44 land45 land46 land47 land48 land49 land50 land51 land52 land53 land54 land55 land56 land57 land58 land59 land60 land61 land62 land63 land64 land65 land66 land67 land68
smpl 25/4/2003 29/1/2004
equation eq{%r}.arch {%r} c rwmp rwmp(-1) rwmp(-2) rwmp(-3) rwmp(-4) rwmp(-5) rhml rhml(-1) rhml(-2) rhml(-3) rhml(-4) rhml(-5) rsmb rsmb(-1) rsmb(-2) rsmb(-3) rsmb(-4) rsmb(-5) {%r}(-1) {%r}(-2) {%r}(-3) {%r}(-4) {%r}(-5) year2003 year2004 year2005 month2 month3 month4 month5 month6 month7 month8 month9 month10 month11 month12 day2 day3 day4 day5
next
Thank you gareth, I'm sorry I bother you with all of my questions
Kind regards
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Static forecasting
forecast in the program.
Something like:
Something like:
Code: Select all
%rf = %r + "_F"
smpl 30/01/2004 31/12/2005
eq{%r}.fit {%rf}
Follow us on Twitter @IHSEViews
Re: Static forecasting
I am só sorry to bother you again, but it still doesn't work. I always get the same error: near singular matrix.
I don't understand, because when I run the same program without the forecasting, but just with genr {%r}_ar=resid after the estimation, it goes perfectly, so I don't think there is a problem with my data. Below you can find my program. Please find enclosed the workfile and program file.
Thanks again for helping me.
for %r land1 land2 land3 land5 land6 land7 land8 land9 land10 land11 land13 land14 land15 land16 land17 land18 land19 land20 land21 land22 land23 land24 land25 land26 land27 land28 land29 land30 land31 land32 land33 land34 land35 land36 land37 land38 land39 land40 land41 land42 land43 land44 land45 land46 land47 land48 land49 land50 land51 land52 land53 land54 land55 land56 land57 land58 land59 land60 land61 land62 land63 land64 land65 land66 land67 land68
smpl 4/25/2003 1/29/2004
equation eq{%r}.arch {%r} c rwmp rwmp(-1) rwmp(-2) rwmp(-3) rwmp(-4) rwmp(-5) rhml rhml(-1) rhml(-2) rhml(-3) rhml(-4) rhml(-5) rsmb rsmb(-1) rsmb(-2) rsmb(-3) rsmb(-4) rsmb(-5) {%r}(-1) {%r}(-2) {%r}(-3) {%r}(-4) {%r}(-5) year2003 year2004 year2005 month2 month3 month4 month5 month6 month7 month8 month9 month10 month11 month12 day2 day3 day4 day5
%rf = %r + "_F"
smpl 1/30/2004 4/15/2005
eq{%r}.fit {%rf}
next
I don't understand, because when I run the same program without the forecasting, but just with genr {%r}_ar=resid after the estimation, it goes perfectly, so I don't think there is a problem with my data. Below you can find my program. Please find enclosed the workfile and program file.
Thanks again for helping me.
for %r land1 land2 land3 land5 land6 land7 land8 land9 land10 land11 land13 land14 land15 land16 land17 land18 land19 land20 land21 land22 land23 land24 land25 land26 land27 land28 land29 land30 land31 land32 land33 land34 land35 land36 land37 land38 land39 land40 land41 land42 land43 land44 land45 land46 land47 land48 land49 land50 land51 land52 land53 land54 land55 land56 land57 land58 land59 land60 land61 land62 land63 land64 land65 land66 land67 land68
smpl 4/25/2003 1/29/2004
equation eq{%r}.arch {%r} c rwmp rwmp(-1) rwmp(-2) rwmp(-3) rwmp(-4) rwmp(-5) rhml rhml(-1) rhml(-2) rhml(-3) rhml(-4) rhml(-5) rsmb rsmb(-1) rsmb(-2) rsmb(-3) rsmb(-4) rsmb(-5) {%r}(-1) {%r}(-2) {%r}(-3) {%r}(-4) {%r}(-5) year2003 year2004 year2005 month2 month3 month4 month5 month6 month7 month8 month9 month10 month11 month12 day2 day3 day4 day5
%rf = %r + "_F"
smpl 1/30/2004 4/15/2005
eq{%r}.fit {%rf}
next
- Attachments
-
- stap1onderzoek_forecast.prg
- (1.76 KiB) Downloaded 286 times
-
- indexprijzen en returns_oefen.wf1
- (778.28 KiB) Downloaded 253 times
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Static forecasting
If I take your program and comment out the line that does the forecasting, I still get the singular matrix error. Indeed, when I estimate the first equation manually, I get a singular matrix error too, so there is nothing wrong with your program.
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 75 guests