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
svydescribe for mi set dataI have been hunting around and trying everything I can think of but cannot figure out how to get the…
Panel data preparation and xtreg functionHi I am new to econometrics and stata, and appreciate some help for the following qns related to my…
Can STATA shows the p-value for each variable used in the discriminant functions?I get my results and I can interpret the coefficient of each independent variable in each function. …
Triple conditions such as relimp==relat==1 do not do what I expect them to do. Why? Where is this behaviour explained?Working on a problem posed in this thread https://www.statalist.org/forums/for...other-variable I di…
Recode VarHello How can we find duplicates in a database? Which command I can use to change the observations o…
Subscribe to:
Post Comments (Atom)
0 Response to Using ascol command to calculate weekly returns using CRSP daily returns
Post a Comment