turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Standard deviation of trailing values

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2015 12:49 PM

Hi there,

I am trying to compute the standard deviation of the trailing 12 months stock returns. What program code can i use? Thanks in advance for your help

Accepted Solutions

Solution

03-12-2015
03:22 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-12-2015 03:22 AM

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2015 01:28 PM

Do you have SAS/ETS software?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2015 02:16 PM

Yes i have SAS software

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2015 03:06 PM

SAS/ETS is a collection of tools for econometrics and time-series data processing and analysis. It includes PROC EXPAND, a procedure for transforming time series data in many ways, including your requirement for the standard deviation of a moving time window. - PG

PG

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2015 03:27 PM

If you only have SAS, but not SAS/ETS, there are still ways to do this.

This forum has addressed how to calculate a moving sum (for the last 12 observations, for example).

You would also have to calculate the moving sum of the squared values, using similar techniques.

If you know SUM, SUM of the squared values, and N=12, you can calculate the standard deviation.

But it's easier of you have SAS/ETS.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2015 11:53 PM

Please send me that link for calculating a moving sum

Solution

03-12-2015
03:22 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-12-2015 03:22 AM