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
Is it possible to have 0 p-value when using chi-square test?Hello, I am having difficulty interpreting the results I have. I want to check whether the probabi…
Gravity model for importsHi, I am new to STATA and I am having some problems in estimating a fixed effects gravity model est…
custom xline value per group in xtlineHi. I'm trying to produce a graph for each US state using -xtline- and the -xline- option (Stata 15.…
Tabulating across variables after using multencodeHi Everyone, I have a string variable that contains multi-picklist values separated by a semi-colon…
Sending output to file _instead of_ Results windowI have a do-file that produces a lot of output from various types of commands. I would like to store…
Subscribe to:
Post Comments (Atom)
0 Response to Using ascol command to calculate weekly returns using CRSP daily returns
Post a Comment