tribeca icon indicating copy to clipboard operation
tribeca copied to clipboard

Where are the ewma defined ?

Open Camille92 opened this issue 8 years ago • 3 comments

Hello Michael,

I want to work on a new strategy for position management but I don't understand where / how you define the length of the ewma.

Is this just here: https://github.com/michaelgrosner/tribeca/blob/master/src/service/main.ts#L118 And should I assume 0.095 = 200mn and 2 * 0.095 = 100mn?

Thank you very much for the info,

Camille

Camille92 avatar May 31 '17 14:05 Camille92

Those values are the alpha values as defined in this equation: https://en.wikipedia.org/wiki/Exponential_smoothing#Basic_exponential_smoothing sampled at 1min intervals

michaelgrosner avatar Jun 02 '17 11:06 michaelgrosner

Hello,

Thank you for the info. However there is something I don't understand. 0.095 should give an EWMA of 20 and not 200. How do you manage to do that?

For ewma 200 minutes it should be something like 0.00995024

Camille92 avatar Jun 02 '17 14:06 Camille92

i hate math but currently the hardcoded time period for EWMA is 20.0526

ctubio avatar Jun 03 '17 17:06 ctubio