I'm running a real-time forecasting exercise with a BM model, using the AR as a benchmark. I'd like to expand the model adding a BVAR benchmark (Minnesota prior). I use Eviews7 and dowloaded the BVAR add-in but I don't know how to use it in a real-time context, in the programming code.
I copy what I've done for the AR (hoping that it's not too long): can someone please help me?
Code: Select all
!vqtr=1
for !v = 1 to 75 step 3
!vmth = 1
!vn = !v
for %0 {%paese}
call load_Qdata
for %m1 %m2 "uni" "back"
smpl 2005q4-!spanq+!vqtr 2005q4-1+!vqtr
!tolav = 0.05
!tolin = 0.05
'
for %7 yar ddar mar xar pyar pdar pmar pxar
equation eq_{%7}_{%0}.stepls(method={%m1}, {%m2}, btol={!tolin}, ftol={!tolav}) dlog({%7}_{%0}) c @ _
dlog({%7}_{%0}(-1)) dlog({%7}_{%0}(-2)) dlog({%7}_{%0}(-3)) dlog({%7}_{%0}(-4))
eq_{%7}_{%0}.ls
next
next
smpl 2005q4-1+!vqtr+1 2005q4-1+!vqtr+!horizonq
bm_{%0}.solve
rename bm_{%0} v{!vqtr}_{!vmth}_bm_{%0}
smpl @first 2005q4-1+!vqtr+!horizonq
for %2 yar mar xar pyar pmar pxar
genr v{!vqtr}_{!vmth}_{%2}_{%0} = {%2}_{%0}_0
delete {%2}_{%0} {%2}_{%0}_0
next
'
' this part computes the second and third month of the term
!vmth = !vmth + 1
while !vmth<=3
!vn = !vn+1
smpl @all
for %0 {%paese}
'HERE SAME CODE AS IN THE 1st LOOP
!vmth = !vmth+1
wend
!vqtr = !vqtr + 1
!vn=!vn+1
smpl @all
next