Offset

G

Guest

Hi! In column A I have a series of returns and in column B I want to
calculate the standard deviation. This is no problem. The problem is that
sometimes I want to calculate the standard deviation for 10 days rolling
return (ie 10 rows) and sometimes for a 100 days rolling return. How can I
write a formula that does this? I have a named range where I enter the number
of days that I want to use in the standard deviation calculation. Please
help!
 
G

Guest

Assuming data in A2 down
think you could try this in say, B2:
=STDEV(OFFSET(A2,,,Days))
where Days would be a named cell for the input: 10 or 100, etc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top