Dear Stata community,

I hope you are all doing well.

I've cleaned all my data using Stata and then have the right variables .

But then I was not sure how I can calculate these two formula with these variables I created.
Here 'm' means months.
So I tried some for loops , but lacked skills to express these successfully.
Could anyone please give me some hints on how I shold approach these?

month price FutRet1
1992m1 19.02 203.70
1992m2 19.16 199.02
1992m3 18.93 202.22
1992m4 20.29 205.02
.........................................
.
.
.........................................

Array Array