<code></code> Dear experts, I have the following information. data have;
infile datalines dlm=',' dsd truncover;
input ID Date:anydtdte. Returns Delisting_return month year;
format date date9.;
datalines;
1,1967-10-28,1.025,,10,1967
1,1967-11-28,1.026,,11,1967
1,1967-12-28,1.027,,12,1967
1,1968-01-28,1.01,,1,1968
1,1968-02-28,1.04,,2,1968
1,1968-03-28,1.001,,3,1968
1,1968-04-28,1.005,,4,1968
1,1968-05-28,1.02,,5,1968
1,1968-06-28,1.02,,6,1968
1,1968-07-28,1.06,,7,1968
1,1968-08-28,1.06,,8,1968
1,1968-09-28,1.07,,9,1968
1,1968-10-28,1.07,,10,1968
1,1968-11-28,1.08,,11,1968
1,1968-12-28,1.01,,12,1968
1,1969-01-28,1.01,,1,1969
1,1969-02-28,1.04,,2,1969
1,1969-03-28,1.001,,3,1969
1,1969-04-28,1.005,,4,1969
;
run;
ID Date Returns Delisting return month year 1 1967-10-28 1.025 10 1967 1 1967-11-28 1.026 11 1967 1 1967-12-28 1.027 12 1967 1 1968-01-28 1.01 1 1968 1 1968-02-28 1.04 2 1968 1 1968-03-28 1.001 3 1968 1 1968 -04-28 1.005 . 4 1968 1 1968-05-28 1.02 5 1968 1 1968-06-28 1.02 6 1968 1 1968-07-28 1.06 7 1968 1 1968-08-28 1.06 8 1968 1 1968-09-28 1.07 9 1968 1 1968-10-28 1.07 10 1968 1 1968-11-28 1.08 11 1968 1 1968-12-28 1.01 12 1968 1 1969-01-28 1.01 1 1969 1 1969-02-28 1.04 2 1969 1 1969-03-28 1.001 3 1969 1 1969-04-28 1.005 4 1969 I would like to conduct multiplication operations on rows. The data is a monthly return data. I would like to find yearly returns using monthly returns, so I need to multiply monthly returns. For instance starting from the beginning (when i buy this stock on 1967). I want to conduct the operations as follows: 1.025*1.026*1.027...........*1.07 that is multiply the returns from 1967-10-28 to 1968-10-28, to find the annual return for holding the stock for a given period. Could anyone please help me with the code to do this task in SAS? Please write if you need more information or clarification. All help is appreciated. I am using SAS 9.4 Regards Akarsh
... View more