Page 1 of 1

how to forecast a series with a upper bound of growth rate

Posted: Mon Sep 24, 2012 7:42 am
by zngtian
Hi,
I have a programming problem in Eviews. I want to forecast a series, called y, from an equation, generating a series called y1. Then I want to control the growth rate of y1, for example, the highest growth rate is set to 2%. A pseudo program code could look like the following

growth_rate = 0.02
if (y1(t) - y1(t-1))/y(t-1) > grow_rate
y1(t) = y1(t-1) * (1 + grow_rate)
end

How can I realize it in Eviews? Thanks

Zheng

Re: how to forecast a series with a upper bound of growth ra

Posted: Mon Sep 24, 2012 7:50 am
by EViews Gareth

Code: Select all

!gr = 0.02 series yf = @recode((y1 - y1(-1))/y1(-1) > !gr, y1, y1(-1)*(1+!gr))

Re: how to forecast a series with a upper bound of growth ra

Posted: Mon Sep 24, 2012 8:00 am
by zngtian

Code: Select all

!gr = 0.02 series yf = @recode((y1 - y1(-1))/y1(-1) > !gr, y1, y1(-1)*(1+!gr))
Thanks!. That's neat!
Zheng