Select a range of records for use in moving averages

D

daverinda

I'm trying to create moving averages of daily index prices and I cannot
figure out how to select specific ranges of records. There is discontinuity
in my TradeDate field (no weekend dates), so it appears that I cannot use the
Date function to define the range of records. I have Autonumbered the
records, and I would like to figure out how to select say, the values from
the IndexPrice field from records 1437 (the most recent), 1436 and 1435, and
average them, and publish them (make-table query) to a new table containing
the array of historical averages (3-day, 5-day, 20-day, etc.). I will then
create a query to append this table of historical moving average data each
day. My apologies if I've been unclear, and many thanks for any help that
you can provide!
 
S

StCyrM

Good evening

How to Compute Moving Averages in Visual or Access Basic is covered in
Microsoft Article ID: Q143237

Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.
 
D

daverinda

Thank you. Your suggestion was very helpful and I was able to implement the
function successfully. But, I'm a total novice with VB, but after some trial
and error. Now I'm on to StDev (DStDev?), but I'm sure I'll run into the
same problem with moving date ranges ...

Dave Hall
 

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