Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Interactive formulas

I am calculating a rolling historical volatility for a series of commodity
returns, using the following formula =STDEV(D6:D35)*SQRT(252)
I want to be able to type in the # of days back to go (e.g. in the example
above, it is a 30-day rolling stdev) in the cell above the top value. That
is, I want to be able to type "50" into the cell and have the formula update
to STDEV(D6:D55)*SQRT(252) automatically.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Interactive formulas

Assuming you enter the number of days in A1, try this:

=IF(A10,STDEV(INDIRECT("D6:D"&A1+5)*SQRT(252),0)

This returns 0 if A1 is blank - you might also want to set some
maximum for A1, such as:

=IF(AND(A10,A1<100),STDEV(INDIRECT("D6:D"&A1+5)*S QRT(252),0)

Hope this helps.

Pete

On Aug 14, 12:20 am, energydoc
wrote:
I am calculating a rolling historical volatility for a series of commodity
returns, using the following formula =STDEV(D6:D35)*SQRT(252)
I want to be able to type in the # of days back to go (e.g. in the example
above, it is a 30-day rolling stdev) in the cell above the top value. That
is, I want to be able to type "50" into the cell and have the formula update
to STDEV(D6:D55)*SQRT(252) automatically.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Interactive formulas

Hi

=STDEV(OFFSET($D$6,,,$X$1,1)*SQRT(252)

, where cell X1 contains the number of days


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"energydoc" wrote in message
...
I am calculating a rolling historical volatility for a series of commodity
returns, using the following formula =STDEV(D6:D35)*SQRT(252)
I want to be able to type in the # of days back to go (e.g. in the example
above, it is a 30-day rolling stdev) in the cell above the top value.
That
is, I want to be able to type "50" into the cell and have the formula
update
to STDEV(D6:D55)*SQRT(252) automatically.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Interactive formulas

"Arvi Laanemets" wrote...
=STDEV(OFFSET($D$6,,,$X$1,1)*SQRT(252)

....

OFFSET is a volatile function, so it recalcs all the time. One nonvolatile
alternative would be

=STDEV($D$6:INDEX($D:$D,$X$1+5))*SQRT(252)


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
Interactive course pepenacho New Users to Excel 1 July 16th 07 10:23 AM
Interactive Charts daigle Charts and Charting in Excel 4 May 24th 06 06:11 PM
Interactive Forms Susan Excel Worksheet Functions 0 January 25th 06 09:48 PM
Interactive checkboxes courtney_lee31 Excel Discussion (Misc queries) 3 November 16th 05 12:50 PM
iNTERACTIVE EXCEL FILE NOT INTERACTIVE ON THE WEB kathy in kansas Excel Discussion (Misc queries) 0 January 24th 05 07:47 PM


All times are GMT +1. The time now is 05:30 PM.

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

About Us

"It's about Microsoft Excel"