Page 1 of 1

Net oil price model

Posted: Wed Mar 27, 2013 4:38 am
by nazebiah
Hi,

I'm trying to create a model for the for a net oil price increase as proposed by J Hamilton where he considers the rate of price increase in the current period relative to price movements over the past year

I would like to create a series that is made up from this logic but I can't work out how to transform this into eviews language.

NOIP = Max(zero, OP - Max ( OP (-1), OP (-2), OP (-3))

where OP is a series of oil prices.

Any ideas would be really appreciated.

Re: Net oil price model

Posted: Wed Mar 27, 2013 6:20 am
by EViews Gareth

Code: Select all

group g1 op(-1) op(-2) op(-3) series noip = @recode((op-@rsum(g1))>0, (0-@rsum(g1)), 0)

Re: Net oil price model

Posted: Wed Mar 27, 2013 7:00 am
by nazebiah
Thank you thats exactly what I was looking for