Skip to content

Some confusions / suggestions #8

Description

@idle1dev

Please correct me if I'm wrong in any of below

  1. funding rate calculation (/main/strategy.py)
Image

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?

  1. incorrect logs (/main/strategy.py)
Image

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.

  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions