How does calgo calculate standard deviation when moving average type is exponential?

Created at 14 Nov 2021, 14:47
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
RE

RedSeaBro

Joined 10.04.2021

How does calgo calculate standard deviation when moving average type is exponential?
14 Nov 2021, 14:47


Hi: 

I need to re-calculate the standard deviation of close prices for moving average type is exponential in python.

How does calgo calculate it? Can anyone provide the math formula or describe the process in details? 

 

 


@RedSeaBro
Replies

PanagiotisCharalampous
15 Nov 2021, 08:19

Hi bowen.guo.kaust,

The standard deviation formula is pretty much... standard :)

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

RedSeaBro
19 Nov 2021, 15:37

RE:

PanagiotisCharalampous said:

Hi bowen.guo.kaust,

The standard deviation formula is pretty much... standard :)

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Thanks a lot for your reply PanagiotisCharalampous.  I understand the formula for regular standard deviation. 

But how does calgo calculate the standard deviation for exponential moving average (ema)? 

For exponential moving average, the average varies at each time sample. Say when calculating the standard deviation for the last 10 time samples, does calgo use the same ema for the 10 samples, or use different ema? And if using the same ema, which ema to use?


@RedSeaBro

PanagiotisCharalampous
19 Nov 2021, 15:45 ( Updated at: 21 Dec 2023, 09:22 )

Hi bowen.guo.kaust,

In the exact same way as simple moving average. Quoting the formula again

The mean value is the average and is the number of periods.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous