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}