Hi!
I have daily data for stock market returns in column B. And the corresponding date (dd/mm/yyyy) of each observation in column A.
I want to compute the STDEV of last 12 months daily returns. And get a standard deviation value for the first day of each month, which I will assume as the standard deviation of that month.
The problem is that not all months have the same number of observations / trading days/ daily returns.
Imagine for 2010 I have 250 observations / daily returns from 1/Jan/2010 to 31/Dec/2010
In column C, I could have run a simple standard deviation formula in cell number 251 (1/Jan/2011), selecting the data to insert in STDEV function as the 250 above cells of column B (daily returns).
The problem is when I drag it down, it will always select the last 250 observations and what I want is to select all the observations corresponding exactly to the last 12 months.
If I do the same for 1/4/2011 I will get the standard deviation for the previous 250 observations instead of the standard deviation of the trading days between 1/4/2010 and 31/03/2011 (the days of the last 12 months)
Is it clear?
I can send you the excel file it it helps.
Thanks in advance for your help.
I have daily data for stock market returns in column B. And the corresponding date (dd/mm/yyyy) of each observation in column A.
I want to compute the STDEV of last 12 months daily returns. And get a standard deviation value for the first day of each month, which I will assume as the standard deviation of that month.
The problem is that not all months have the same number of observations / trading days/ daily returns.
Imagine for 2010 I have 250 observations / daily returns from 1/Jan/2010 to 31/Dec/2010
In column C, I could have run a simple standard deviation formula in cell number 251 (1/Jan/2011), selecting the data to insert in STDEV function as the 250 above cells of column B (daily returns).
The problem is when I drag it down, it will always select the last 250 observations and what I want is to select all the observations corresponding exactly to the last 12 months.
If I do the same for 1/4/2011 I will get the standard deviation for the previous 250 observations instead of the standard deviation of the trading days between 1/4/2010 and 31/03/2011 (the days of the last 12 months)
Is it clear?
I can send you the excel file it it helps.
Thanks in advance for your help.