Hi everyone,
I am currently trying to calculate cumulative stock returns using the asrol function. I want to generate a variable called 'Momentum' that captures the cumulative returns from t-12 until t-2. I used the following code;
asrol RET, stat(product) add(1) gen(Momentum) window(dateYM -12 -2) minimum(13) by(PERMNO)
However, STATA returns the following error;
missing_Min_noFocal(): 3001 expected 8 arguments but received 9
asrolfw(): - function returned error
<istmt>: - function returned error
When I try calculating the cumulative returns from t-12 until t 0 by using this line of code:
asrol RET, stat(product) add(1) gen(Momentum) window(dateYM -12) minimum(12) by(PERMNO)
STATA does not return an error. Can anyone help me with this? I can't figure it out as window() should be able to handle three arguments.
Thank you in advance,
Robin Dijl
I am currently trying to calculate cumulative stock returns using the asrol function. I want to generate a variable called 'Momentum' that captures the cumulative returns from t-12 until t-2. I used the following code;
asrol RET, stat(product) add(1) gen(Momentum) window(dateYM -12 -2) minimum(13) by(PERMNO)
However, STATA returns the following error;
missing_Min_noFocal(): 3001 expected 8 arguments but received 9
asrolfw(): - function returned error
<istmt>: - function returned error
When I try calculating the cumulative returns from t-12 until t 0 by using this line of code:
asrol RET, stat(product) add(1) gen(Momentum) window(dateYM -12) minimum(12) by(PERMNO)
STATA does not return an error. Can anyone help me with this? I can't figure it out as window() should be able to handle three arguments.
Thank you in advance,
Robin Dijl
Comment