When asking for a specific method of calculation it is a good idea to post a link to, or provide the methodology, for the calculation.
Sometimes the "method" you want is in a SAS proc, possibly under another name, or can be programmed but details are needed and we should not have to do your research.
Since this relates to time series data do you have access to SAS/ETS where the time series procedures are available?