proc sql;
create table stock as
select cusip,std(price), invertal(Filing_Date-10biz day to Filing_Date+10biz day) as with_in_std
from rvol
group by cusip, interval(Filing_Date);
quit; Hello! Yeah... I want to calculate std(price) by setting intervals or ranges. I know the code to calculate std(price) set by id, year, or both and several combinations. This time, I try to calculate std(price) by intervals. However, as long as I know there is no code like interval() so wonder how can I obtain std(price) from a certain date to another certain date(In my case, the are std(price) between both ends of 10 business days away from the filing date). As I have the dates on the first row(trading days only), I think I can tack price variations by these trading days. So.. the key is... how to connect a filing date to both ends. I am trying to various possible codes now by searching for this community. So far, I have not found and assume there is none similar. (If I find, I will link it.) If you know some solutions, please share with me! I appreciate your comments!
... View more