### Net oil price (non-linear specification)

Posted:

**Tue Jul 19, 2016 5:38 am**Hi,

I am working on my masters dissertation and I have to analyse the effect of oil price shocks on the stock market returns. I'm trying to build Net Oil Price Increase (NOPI) variable in Eviews and run Var model.

NOPI = max(0, log(op)t - max(log(op)t-1,...,log(op)t-6)

Where op- is oil price

The mode is introduced by Hamilton (1996).

Also, how can I get asymmetric specification of oil price shocks:

dlog(opp)=max(0,dlog(op))

dlog(opn)=min(0,dlog(op))

Where dlog(opp) represents the positive oil price changes, and dlog(opn) represents the negative changes.

How can I translate this into Eviews language?

Kind regards,

Maksim

I am working on my masters dissertation and I have to analyse the effect of oil price shocks on the stock market returns. I'm trying to build Net Oil Price Increase (NOPI) variable in Eviews and run Var model.

NOPI = max(0, log(op)t - max(log(op)t-1,...,log(op)t-6)

Where op- is oil price

The mode is introduced by Hamilton (1996).

Also, how can I get asymmetric specification of oil price shocks:

dlog(opp)=max(0,dlog(op))

dlog(opn)=min(0,dlog(op))

Where dlog(opp) represents the positive oil price changes, and dlog(opn) represents the negative changes.

How can I translate this into Eviews language?

Kind regards,

Maksim