+ Reply to Thread
Results 1 to 6 of 6

annualized monthly standard deviation

Hybrid View

  1. #1
    Registered User
    Join Date
    12-28-2017
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    3

    annualized monthly standard deviation

    Hi guys,

    I have a question regarding an Excel (2016) sheet I am currently working on. I have the feeling the solution must be quite simple but I spent a few hours researching already and cannot find a solution.
    I have 50k rows of data, where I have:

    Column F: the monthly stock price of around 400 firms from 2007 to 2016 (hence, each firm has 120 rows of data). The first 120 rows are e.g. Oracle, then the next 120 rows Apple, and so on.

    Column G: the monthly return on the S&P 500 in % for the months 2007 through 2016. One month it went up by 3.6%, the next down by 3.5%, etc. Of course, these values begin to repeat after 120 rows when the next firm is listed.

    Column H: the monthly percentage change of the stock, so basically it shows how the values in column F change in % terms from month to month.

    Column I: the annualized monthly standard deviation of the S&P 500. Idea is straightforward, I take the standard deviation of each 12 months of column G and multiply by sqrt(12). It was easy to copy that down the 50k rows as the values for the S&P start from the beginning every 120 rows (I did it manually 10 times for the 10 years, then copied it down).

    Column J: There I want to do the same as in column I, just for the 400 firms, but obviously now I cannot copy the formula down (each stock has unique returns & std. dev. over the time period).

    Thus, how do I write a formula that automatically changes every 12 rows the fixed 12-row range that I take from column H to calculate the annualized standard deviation in column J?

    excel forum.JPG


    Very much appreciate your help!

    Best

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,998

    Re: annualized monthly standard deviation

    Welcome to the forum! Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-28-2017
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: annualized monthly standard deviation

    Of course!

    I attached a sample file below, thanks for helping.

    Best
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,998

    Re: annualized monthly standard deviation

    Try this in I2:

    =STDEVA(IF(LEFT($B$2:$B$1030,4)=LEFT(B2,4),IF($A$2:$A$1030=A2,$G$2:$G$1030)))*SQRT(12)

    ... confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Once confirmed, copy down.

  5. #5
    Registered User
    Join Date
    12-28-2017
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: annualized monthly standard deviation

    Dear AliGW,

    thanks a lot for your great help, the formula works perfectly and saved me a lot of time!

    have a nice evening

    Freshmind

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,998

    Re: annualized monthly standard deviation

    You are most welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 05-13-2017, 02:14 PM
  2. Different in calculating annualized monthly return
    By wanmuhd in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-21-2016, 03:41 AM
  3. [SOLVED] Monthly Return Stream - Annualized
    By MCII in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-08-2015, 10:41 AM
  4. [SOLVED] Computing monthly standard deviation from daily data
    By Quantopic in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-07-2014, 07:42 AM
  5. Excel 2007 : standard deviation
    By Jerseynjphillypa in forum Excel General
    Replies: 6
    Last Post: 06-15-2012, 12:21 PM
  6. [SOLVED] Standard Deviation
    By Stan Banner in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-11-2006, 05:15 PM
  7. Standard Deviation help
    By paddyb270 in forum Excel General
    Replies: 1
    Last Post: 10-30-2005, 07:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1