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
Error message: I/O error writing .dta fileHello everyone, I've been using stata for sometime now and since some days ago I've started getting…
GMM (or any other test for endogeneity) with short time periodHello everyone, I have a dataset which has around 4000 observations. To be more clear, I have merge…
Replacing values using a loopDear Stata users, I would like to execute the following command through a loop: replace q33_1=.a i…
Allocation of 1 or 0 to a variable based on an odds ratio contained in another variable.I have a final dataset that contains the three variables shown in the table below. I need to assign …
generate a conditional variableguys, can you help me to generate a variable named "sandwich household'? sandwich household is a hou…
Subscribe to:
Post Comments (Atom)
0 Response to Using ascol command to calculate weekly returns using CRSP daily returns
Post a Comment