Best users,

For my thesis I'm partly using a paper by Shue and Townsend, that is on how stock option pay influences executive risk taking.
The most important thing is that they detect the predicted multi-year cycles of how stock options are being paid, which is also what I want to do.
They state that companies have same number cycles and same value cycles and they are on those if the executive either has the same number of options in 2 or more consecutive years or the same value of options in 2 or more consecutive years. They also state that once the companies are on a cycle, they do not change.
So, up to now I have found the actual realized cycles. Which is found with

gen actualnumber=.
bysort expercomp: replace actualnumber=1 if f.option_number==option_number

gen actualvalue=.
bysort expercomp: replace actualvalue=1 if f.option_value==option_value

which get's me this Array


However, I now want to conduct the predicted cycles.
So, I want to construct a variable that will start from the first year of the realized cycle (and will be noted as 1) and then every first year of the predicted cycle (also noted as 1).

which I want it to look like this, but this I just did by hand, which is not doable to do for every observation I have. Also, the cycle length per company is different so I also need to detect that firstly I'm guessing. Array


I would really appreciate your help.
Let me know if anything is not clear.

Thank you in advance.

Best,
Lisa