By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,828 Members | 801 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,828 IT Pros & Developers. It's quick & easy.

Moving average (how to calculate)

P: n/a
Hello,

I need to calculate moving averages of weekly data during the last
year.
After some search, I believe that the best approach will be to get a
dataset from the SQL Server database, browse the records and, using an
algorithm, calculate the moving average.

There is an article on the "Code Project" website entitled "A Simple
Moving Average Algorithm" but honnestly I have been unable to
implement the solution.

Any tip, pseudo code or existing algorithm will be most welcome,

Thanks for your help,

Michel
Aug 4 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
JDS
On Aug 4, 6:02*pm, Michel <MichelCou...@gmail.comwrote:
Hello,

I need to calculate moving averages of weekly data during the last
year.
After some search, I believe that the best approach will be to get a
dataset from the SQL Server database, browse the records and, using an
algorithm, calculate the moving average.

There is an article on the "Code Project" website entitled "A Simple
Moving Average Algorithm" but honnestly I have been unable to
implement the solution.

Any tip, pseudo code or existing algorithm will be most welcome,

Thanks for your help,

Michel
There is a great article on Wikipedia that includes some pseudo code:
http://en.wikipedia.org/wiki/Algorit...ating_variance

This article also explains pros and cons of different methods.

If you need some example code let me know. I have some in C
(not .Net).

HTH

Jeremy.
Aug 4 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.