Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 170
Default can this be done faster?

Hi my question is simple and I do know a very slow and tedious way of doing
it. Anybody can offer me any advice to do it in a faster way? Here is my data
series.

I have an index daily closing price for 19 years.

Date Price
1/1/1998 20.30
1/2/1998 20.80
1//3/1998 20.45
****** ****
1/31/1998 23.98
2/1/1998 26.00
****** ****
9/31/2006 120.60

I want to compute monthly volatility (standard deviation) using daily
return. So for each month, I will use stdev function and select the
corresponding daily return (ranges from 20-25 data points depending on how
many trading days in that specific month). I need to do stdev functions for
200+ times to complete this exercise. Any one know any better way to do this?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default can this be done faster?

On Thu, 23 Nov 2006 06:00:01 -0800, frank
wrote:

Hi my question is simple and I do know a very slow and tedious way of doing
it. Anybody can offer me any advice to do it in a faster way? Here is my data
series.

I have an index daily closing price for 19 years.

Date Price
1/1/1998 20.30
1/2/1998 20.80
1//3/1998 20.45
****** ****
1/31/1998 23.98
2/1/1998 26.00
****** ****
9/31/2006 120.60

I want to compute monthly volatility (standard deviation) using daily
return. So for each month, I will use stdev function and select the
corresponding daily return (ranges from 20-25 data points depending on how
many trading days in that specific month). I need to do stdev functions for
200+ times to complete this exercise. Any one know any better way to do this?


Set up a Pivot Table.

1. Make sure your dates are Excel dates and not Text (e.g.
=ISTEXT(date_reference) should return FALSE.

2. Data/Pivot Table and Chart/Finish

3. Drag "DATE" to the row area
4. Drag "PRICE" to the Data area.

5. Select some cell in the ROWS area (which will be a date)
6. Right Cllick
Group and Show Detail
Group
Select Years and Months

7. Select a cell in the DATA area
8. Right click
Field Setttings
Select STDEV


There are ways of automating the process using VBA so that once you have the
Pivot Table set up, you can "refresh" it with new data. But the above should
get you started on an easier process than what you are now doing.

Good luck!

Another method, of course, would be to use a charting program like Metastock --
but that would be a lot more expensive.


--ron
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default can this be done faster?

I will (for the example) assume data is in A2:B1000
In F1:F19 put the years (1998, 1999 ...)
In E2:E13 put month numbers (1,2,3 ... 12)
In F2 enter
=STDEV(IF((MONTH(A2:A1000)=$E2)*(YEAR(A2:A1000)=F$ 1),($B$2:$B$1000))) and
complete it with CTRL+SHIFT+ENTER not just ENTER because it is an array
formula - Excel will enclose the formula in curly braces {} Pay close
attention to the location of the $ symbols - to make absolute references to
rows and columns.
Copy the formula down and across the table
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"frank" wrote in message
...
Hi my question is simple and I do know a very slow and tedious way of
doing
it. Anybody can offer me any advice to do it in a faster way? Here is my
data
series.

I have an index daily closing price for 19 years.

Date Price
1/1/1998 20.30
1/2/1998 20.80
1//3/1998 20.45
****** ****
1/31/1998 23.98
2/1/1998 26.00
****** ****
9/31/2006 120.60

I want to compute monthly volatility (standard deviation) using daily
return. So for each month, I will use stdev function and select the
corresponding daily return (ranges from 20-25 data points depending on how
many trading days in that specific month). I need to do stdev functions
for
200+ times to complete this exercise. Any one know any better way to do
this?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default can this be done faster?

Step 5: I found one had to right click the DATE label, not a cell with a
date value, in order to get the menu that permitted month & year group.
But, thanks, I learnt something more about PTs.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Ron Rosenfeld" wrote in message
...
On Thu, 23 Nov 2006 06:00:01 -0800, frank

wrote:

Hi my question is simple and I do know a very slow and tedious way of
doing
it. Anybody can offer me any advice to do it in a faster way? Here is my
data
series.

I have an index daily closing price for 19 years.

Date Price
1/1/1998 20.30
1/2/1998 20.80
1//3/1998 20.45
****** ****
1/31/1998 23.98
2/1/1998 26.00
****** ****
9/31/2006 120.60

I want to compute monthly volatility (standard deviation) using daily
return. So for each month, I will use stdev function and select the
corresponding daily return (ranges from 20-25 data points depending on how
many trading days in that specific month). I need to do stdev functions
for
200+ times to complete this exercise. Any one know any better way to do
this?


Set up a Pivot Table.

1. Make sure your dates are Excel dates and not Text (e.g.
=ISTEXT(date_reference) should return FALSE.

2. Data/Pivot Table and Chart/Finish

3. Drag "DATE" to the row area
4. Drag "PRICE" to the Data area.

5. Select some cell in the ROWS area (which will be a date)
6. Right Cllick
Group and Show Detail
Group
Select Years and Months

7. Select a cell in the DATA area
8. Right click
Field Setttings
Select STDEV


There are ways of automating the process using VBA so that once you have
the
Pivot Table set up, you can "refresh" it with new data. But the above
should
get you started on an easier process than what you are now doing.

Good luck!

Another method, of course, would be to use a charting program like
Metastock --
but that would be a lot more expensive.


--ron



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 170
Default can this be done faster?

Hi Bernard, using this approach, I found it works for Jan 1988 and it does
work from Feb 1988. The number I got is different from mannually computed.
Thanks for your input.

"Bernard Liengme" wrote:

I will (for the example) assume data is in A2:B1000
In F1:F19 put the years (1998, 1999 ...)
In E2:E13 put month numbers (1,2,3 ... 12)
In F2 enter
=STDEV(IF((MONTH(A2:A1000)=$E2)*(YEAR(A2:A1000)=F$ 1),($B$2:$B$1000))) and
complete it with CTRL+SHIFT+ENTER not just ENTER because it is an array
formula - Excel will enclose the formula in curly braces {} Pay close
attention to the location of the $ symbols - to make absolute references to
rows and columns.
Copy the formula down and across the table
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"frank" wrote in message
...
Hi my question is simple and I do know a very slow and tedious way of
doing
it. Anybody can offer me any advice to do it in a faster way? Here is my
data
series.

I have an index daily closing price for 19 years.

Date Price
1/1/1998 20.30
1/2/1998 20.80
1//3/1998 20.45
****** ****
1/31/1998 23.98
2/1/1998 26.00
****** ****
9/31/2006 120.60

I want to compute monthly volatility (standard deviation) using daily
return. So for each month, I will use stdev function and select the
corresponding daily return (ranges from 20-25 data points depending on how
many trading days in that specific month). I need to do stdev functions
for
200+ times to complete this exercise. Any one know any better way to do
this?







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 170
Default can this be done faster?

problem solved by modify the cell calculation to:

=STDEV(IF((MONTH(A$2:A$1000)=$E2)*(YEAR(A$2:A$1000 )=F$1),($B$2:$B$1000)))

"frank" wrote:

Hi Bernard, using this approach, I found it works for Jan 1988 and it does
work from Feb 1988. The number I got is different from mannually computed.
Thanks for your input.

"Bernard Liengme" wrote:

I will (for the example) assume data is in A2:B1000
In F1:F19 put the years (1998, 1999 ...)
In E2:E13 put month numbers (1,2,3 ... 12)
In F2 enter
=STDEV(IF((MONTH(A2:A1000)=$E2)*(YEAR(A2:A1000)=F$ 1),($B$2:$B$1000))) and
complete it with CTRL+SHIFT+ENTER not just ENTER because it is an array
formula - Excel will enclose the formula in curly braces {} Pay close
attention to the location of the $ symbols - to make absolute references to
rows and columns.
Copy the formula down and across the table
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"frank" wrote in message
...
Hi my question is simple and I do know a very slow and tedious way of
doing
it. Anybody can offer me any advice to do it in a faster way? Here is my
data
series.

I have an index daily closing price for 19 years.

Date Price
1/1/1998 20.30
1/2/1998 20.80
1//3/1998 20.45
****** ****
1/31/1998 23.98
2/1/1998 26.00
****** ****
9/31/2006 120.60

I want to compute monthly volatility (standard deviation) using daily
return. So for each month, I will use stdev function and select the
corresponding daily return (ranges from 20-25 data points depending on how
many trading days in that specific month). I need to do stdev functions
for
200+ times to complete this exercise. Any one know any better way to do
this?





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default can this be done faster?

Yes, this was a silly error of mine! Sorry
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"frank" wrote in message
...
problem solved by modify the cell calculation to:

=STDEV(IF((MONTH(A$2:A$1000)=$E2)*(YEAR(A$2:A$1000 )=F$1),($B$2:$B$1000)))

"frank" wrote:

Hi Bernard, using this approach, I found it works for Jan 1988 and it
does
work from Feb 1988. The number I got is different from mannually
computed.
Thanks for your input.

"Bernard Liengme" wrote:

I will (for the example) assume data is in A2:B1000
In F1:F19 put the years (1998, 1999 ...)
In E2:E13 put month numbers (1,2,3 ... 12)
In F2 enter
=STDEV(IF((MONTH(A2:A1000)=$E2)*(YEAR(A2:A1000)=F$ 1),($B$2:$B$1000)))
and
complete it with CTRL+SHIFT+ENTER not just ENTER because it is an array
formula - Excel will enclose the formula in curly braces {} Pay close
attention to the location of the $ symbols - to make absolute
references to
rows and columns.
Copy the formula down and across the table
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"frank" wrote in message
...
Hi my question is simple and I do know a very slow and tedious way of
doing
it. Anybody can offer me any advice to do it in a faster way? Here is
my
data
series.

I have an index daily closing price for 19 years.

Date Price
1/1/1998 20.30
1/2/1998 20.80
1//3/1998 20.45
****** ****
1/31/1998 23.98
2/1/1998 26.00
****** ****
9/31/2006 120.60

I want to compute monthly volatility (standard deviation) using daily
return. So for each month, I will use stdev function and select the
corresponding daily return (ranges from 20-25 data points depending
on how
many trading days in that specific month). I need to do stdev
functions
for
200+ times to complete this exercise. Any one know any better way to
do
this?







  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Pivot table for monthly % return ANNUALIZED?


Hi All,
This is a great way to learn hints, and in reading about Pivot Tables below,
I thought someone may know the solution to my problem:
- I have 2 columns of data, A is the month/year and B is the PERCENT RETURN
for that month
- I have 17 months of data, and was asked to ANNUALIZE the ENTIRE PERIOD?
- Is this possible ? I tried using the (1 + (RETURN ^(17/12) * (1 +
(RETURN ^(17/12), which is time consuming and somehow got a ridiculous
number????
- HOW DO I ANNUALIZE PERCENT RETURNS more efficiently? Arrays? Pivot
tables? I am so overwhelmed and forget all that I learned LONG ago...ANY
HELP WILL COME BACK TO YOU IN GOOD VIBES! Keep up the great posts!


"Ron Rosenfeld" wrote:

On Thu, 23 Nov 2006 06:00:01 -0800, frank
wrote:

Hi my question is simple and I do know a very slow and tedious way of doing
it. Anybody can offer me any advice to do it in a faster way? Here is my data
series.

I have an index daily closing price for 19 years.

Date Price
1/1/1998 20.30
1/2/1998 20.80
1//3/1998 20.45
****** ****
1/31/1998 23.98
2/1/1998 26.00
****** ****
9/31/2006 120.60

I want to compute monthly volatility (standard deviation) using daily
return. So for each month, I will use stdev function and select the
corresponding daily return (ranges from 20-25 data points depending on how
many trading days in that specific month). I need to do stdev functions for
200+ times to complete this exercise. Any one know any better way to do this?


Set up a Pivot Table.

1. Make sure your dates are Excel dates and not Text (e.g.
=ISTEXT(date_reference) should return FALSE.

2. Data/Pivot Table and Chart/Finish

3. Drag "DATE" to the row area
4. Drag "PRICE" to the Data area.

5. Select some cell in the ROWS area (which will be a date)
6. Right Cllick
Group and Show Detail
Group
Select Years and Months

7. Select a cell in the DATA area
8. Right click
Field Setttings
Select STDEV


There are ways of automating the process using VBA so that once you have the
Pivot Table set up, you can "refresh" it with new data. But the above should
get you started on an easier process than what you are now doing.

Good luck!

Another method, of course, would be to use a charting program like Metastock --
but that would be a lot more expensive.


--ron

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
faster way of data entry jd New Users to Excel 3 August 12th 06 12:17 AM
What it takes for Excel to run faster ? Steven Vegeta Excel Discussion (Misc queries) 2 August 6th 06 08:47 PM
How to get Excel to work faster Siva Excel Worksheet Functions 4 April 7th 06 01:48 PM
Make Excel Work faster Siva New Users to Excel 1 April 7th 06 10:33 AM
Excel97 faster than Excel2000!! ALRSA Excel Discussion (Misc queries) 6 June 29th 05 08:10 AM


All times are GMT +1. The time now is 01:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"