Net oil price model

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

nazebiah
Posts: 4
Joined: Fri Mar 15, 2013 7:12 pm

Net oil price model

Postby nazebiah » Wed Mar 27, 2013 4:38 am

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11836
Joined: Tue Sep 16, 2008 5:38 pm

Re: Net oil price model

Postby EViews Gareth » Wed Mar 27, 2013 6:20 am

Code: Select all

group g1 op(-1) op(-2) op(-3)
series noip = @recode((op-@rsum(g1))>0, (0-@rsum(g1)), 0)
Follow us on Twitter @IHSEViews

nazebiah
Posts: 4
Joined: Fri Mar 15, 2013 7:12 pm

Re: Net oil price model

Postby nazebiah » Wed Mar 27, 2013 7:00 am

Thank you thats exactly what I was looking for


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 4 guests