Please correct me if I'm wrong in any of below
- funding rate calculation (/main/strategy.py)
I don't get why it divides the annualized funding rate by just 5 to get 'Annualized rate to per-second rate'. Shouldn't it be divided by 365.25 * 24 * 3600?
- incorrect logs (/main/strategy.py)
I think it should check if funding rate is ready. Also, log of when _smoothen_basis is not ready, should be about basis instead of funding rate.
- accuracy of exponential moving average (main/utils/data_methods.py)
class ExponentialMovingAverage:
...
It accepts init_val, but it sets timestamp as 0 always.
When its update is called first time, because the time_difference will be always large, init_val will always be ignored.
I think in init, if init_val is a valid value, it should also set timestamp as when the value is accured instead of 0.
- Currently there is no bias correction, which means the first value will have a heavy weight in the beginning. I think bias correction can be applied to make it more accurate, by letting self.corrected_value = self.value / (1 - e^{ log(2) / half_life_ms * time_difference_from_initial_update}) and returning self.corrected_value for get_value.
Please correct me if I'm wrong in any of below
I don't get why it divides the annualized funding rate by just 5 to get 'Annualized rate to per-second rate'. Shouldn't it be divided by 365.25 * 24 * 3600?
I think it should check if funding rate is ready. Also, log of when _smoothen_basis is not ready, should be about basis instead of funding rate.
class ExponentialMovingAverage:
...
It accepts init_val, but it sets timestamp as 0 always.
When its update is called first time, because the time_difference will be always large, init_val will always be ignored.
I think in init, if init_val is a valid value, it should also set timestamp as when the value is accured instead of 0.