calculating moving average

J

johnkoopman1976

Hello,

I am trying to calculate a moving average for stock quotes. The problem
is that the time interval is not continuous. I get for example at
11.55.33 a stock quote the next one can be at 11.56.21 and the next at
12.00.21. I want to copy the stock quotes at certain time intervals. So
for example copy the stock quote at every 5 minutes. Save them and than
calculate a moving average. Can anybody help me please?

Kind regards,

John
 
A

Ardus Petus

Assuming your 2 columns of data (timestamp, value) are in columns A and B

D1 : desired interval (00:05:00)
E1: = start time (eg 11:30:00)
E2: =E1+$D$1
fill down
F1: =VLOOKUP(A1:B999;E1;2;TRUE)
fill down
G1: =AVERAGE(F$1:F1)
fill down

See example: http://cjoint.com/?fomlIQWtNp

HTH
 

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