Hey guys,

I am currently a final year student and i am writing my Economics dissertation on Oil prices. I am trying to mathematically create the command for the variable (Net Oil price increase) shown below. OPt is the current oil price variable and OPt-1...OPt-6 is it's lagged values. Your help would be much appreciated!

𝑁𝑂𝑃𝐼𝑡 = max{0, 𝑜𝑝𝑡 − max{𝑜𝑝𝑡−1, 𝑜𝑝𝑡−2, 𝑜𝑝𝑡−3, 𝑜𝑝𝑡−4, 𝑜𝑝𝑡−5, 𝑜𝑝𝑡−6}