Moving Average and Performance

S

shapper

Hello,

I need to create a few indicators to be applied to time series.
For example, a Simple Moving Average.
I will use it to test long series of data but also in real time when I
test a model.

For a Simple Moving Average 20 the current value is the average of the
last 20 bars.

I would like to create a robust C# code with good speed performance so
I can base my indicators on this code.

Could someone, please, help me out?

Thanks,
Miguel
 
A

Arne Vajhøj

shapper said:
I need to create a few indicators to be applied to time series.
For example, a Simple Moving Average.
I will use it to test long series of data but also in real time when I
test a model.

For a Simple Moving Average 20 the current value is the average of the
last 20 bars.

I would like to create a robust C# code with good speed performance so
I can base my indicators on this code.

Could someone, please, help me out?

I don't think you have a problem that you need help to.

Short timeseries will take microseconds and long timeseries
will take milliseconds.

Obviously you can just add one and subtract one instead of summing
twenty when moving forward.

Arne
 

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