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

bowen.guo.kaust since: 10 Apr 2021;

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

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? 

PanagiotisCharalampous's avatar

PanagiotisCharalampous since: 13 Jan 2017;

  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

Head of Community Management at cTrader

bowen.guo.kaust since: 10 Apr 2021;

  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?

PanagiotisCharalampous's avatar

PanagiotisCharalampous since: 13 Jan 2017;

  19 Nov 2021, 15:45

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

Head of Community Management at cTrader