Posted 2 seconds ago (0 views) Hi, I am new to SAS and I have a project where I need to calculate the price growth persistence ratio. it is a little bit complex so I will try my best to be clear. Here are the details: 1. I have 1000 stocks and each stock has 3~10 years of data. I have calculated the annual relative price for each stock. 2. I need to take each of the 10 years ( I will use 10 years as an example, but not every stock has 10 years of data) as a “base year”, count the number of subsequent years that the average relative price is higher than the base year. 3. Sum the 10 counts. The max count is 45, meaning every year was higher than the base year and the minimum is 0, meaning every year was lower than the base year. 4. Divide the sum by the total possible count (which is 45 in this example) to get a ratio. I am attaching an example that I did in excel. But calculating the ratio for 1000 stocks really got me stumped. Any help would be greatly appreciated. Thanks.
... View more