Hi,

I'm probably doing something wrong with the "asrol" syntax from Attaullah Shah. I'm not getting cumulative returns. Can someone help?
Code:
tsset id ym
bys id ym:  asrol CAR_S, stat(product) add(1)



Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input double(ym id CAR_S)
193 1    -.04955649465375699
194 1    -.06339490131920597
195 1   -.022085909105983882
196 1    .050697072999447534
197 1    .015230009468702002
198 1   .0044657760369326924
199 1    .016849011886329264
200 1   -.003153071843080413
201 1    .010034142523957394
202 1    .031735799661085064
203 1   .0036262201701611953
204 1     .03760646303660476
205 1    .016097575927271204
206 1    .015511188873208343
207 1   -.005901847848517589
208 1    .010227200135054593
209 1    .008956018347505076
210 1    -.09069565744070669
211 1    -.04356956415343178
212 1    .008692812643197028
213 1    .021555931457827023
214 1   -.011051662828309676
215 1   -.019155843469957575
216 1     .02394801626547746
217 1   .0024130812262438918
218 1    .046774057850537655
219 1    .025613313637882697
220 1    .009572651020898989
221 1    .005885842700802982
222 1   -.023417903444773312
223 1    .010768635318696082
224 1    .005129555054158105
225 1    .018504713044698487
226 1     .05721799946508763
227 1   -.004034280793466982
228 1    .039863368901251195
229 1    .008113956057296928
230 1        .04813445457096
231 1    .024557671171833193
232 1   .0021289686762756173
233 1     .01712487596677482
234 1    .011436768405005182
235 1    .026345094579980625
236 1 -.00007732036831873402
237 1     .03590608189676079
238 1     .01215903951037156
239 1    -.00546684182346498
240 1    .015514306796014525
241 1    .028945524776290102
242 1   -.009724231404096386
243 1    -.03388116209394454
244 1     .02277083712420869
245 1 -.00047009329370436117
246 1    .011231010098306918
247 1    .010156940088288552
248 1    .009350310254616002
249 1    .014001954350949577
250 1  -.0019086276571913174
251 1    -.01730841501540114
252 1     .03326560411905675
253 1   -.006055385093723236
254 1  -.0023308572972210555
255 1     .02009088459345122
256 1    .008087691581694178
257 1   -.008601905047548285
258 1     .02783416631801733
259 1    .004189224092838906
260 1     .02561637959353789
261 1   -.017545000467375563
262 1    -.02418127025423753
263 1    .013396784957990586
264 1    .011709206337278675
265 1   -.013208294583861713
266 1     .00462360687258057
267 1     .01900091441727937
268 1    .029679684801061413
269 1    -.00999856674957024
270 1    .010124913051220472
271 1  -.0013482369096798153
272 1    .014429577138271055
273 1    .004836774477703437
274 1    -.01962102790226682
275 1    -.01725133428113402
276 1    .008021924416397114
277 1    .015691281499534068
278 1    -.01702288857550267
279 1     .01046120612915143
280 1    .009219742775645445
281 1   -.007226977368491912
282 1    .011101008297093198
283 1     .01080773272038691
284 1   -.005434795777432373
285 1    .009559707941618135
286 1    .012934853721415316
287 1    .002529885762944622
288 1     .01938589148772408
289 1   .0014288137609656726
290 1    .007208830272759531
291 1    .022513073706967125
292 1    .007799676743364827
end
format %tm ym