I tried to convert daily stock returns to weekly returns for panel data with firm, date, and returns (simple) for each observation. I tried using the ascol command with the following syntax:
ascol RET , toweek time(date) panel(permno) returns(simple) keep(all)
date is the date of the daily return in CRSP, and permno is the firm identifier on CRSP.
Stata always returns an error code of 3301:
PRODUCT(): 3301 subscript invalid
asrolnw(): - function returned error
<istmt>: - function returned error
The sample consists of about 20,000 firms and 32 years.
Does anyone know what the error code implies here? How should I fix my syntax to make it work? Thank you!
Related Posts with Using ascol command to calculate weekly returns using CRSP daily returns
Interpretation for Vector Error Correction Model with 4 variables and 2 cointegration vectorsI have 4 time series variables, y, x, z, w,, which are filtered by tsmooth command. I tried to do co…
How to make a graph that shows reliable and clinically significant change in particular variable?Dear Statalisters, I appreciate if anyone can help with how to make a graph showing reliable and cl…
how to use stcurve for Cox model after multiple imputation?Hello, Statalist! I have a question about the stcurve after a multiple imputation. So, after the f…
Does gen,sum() and egen,total() work differently when combined with bysort?Hi, Please consider the following data: Code: * Example generated by -dataex-. For more info, type…
Xtabond2 for system GMM. Please help me for codingDear all, I am working with the xtabond2 command in Stata to solve the endogeneity problem of my es…
Subscribe to:
Post Comments (Atom)
0 Response to Using ascol command to calculate weekly returns using CRSP daily returns
Post a Comment