I am using SAS. I have a dataset called EOD_close_rtn, which looks as below:
date CF888 A9888 AG888 AL888 AU888 C9888 CU888 ER888 IF888 J9888
4-Jun-13 20220 4828 4621 14855 281.11 2434 53060 2628 2561.4 1489
5-Jun-13 20210 4827 4620 14850 281.1 2435 53080 2627 2561.6 1489
6-Jun-13 20215 4829 4621 14860 281.14 2435 53080 2627 2561.4 1491
The first column is the date, and the rest columns are prices corresponding to the contract names on top. I want to calculate the daily return for each contract, and the output should be in the same format. I tried to use LAG function, but don't know how to apply the same functions to all columns.