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!
0 Response to Using ascol command to calculate weekly returns using CRSP daily returns
Post a Comment