mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00:00
replaced weighted mean to weighted median
This commit changes the weighted mean to the weighted median for the calculation of the premium displayed on the robosats.
This commit is contained in:
parent
f2f90bd948
commit
f4caa98eef
@ -192,8 +192,3 @@ def compute_avg_premium(queryset):
|
||||
values_sorted=False)
|
||||
|
||||
return weighted_median_premium, total_volume
|
||||
|
||||
total_volume = sum(volumes)
|
||||
# Avg_premium is the weighted average of the premiums by volume
|
||||
avg_premium = sum(weighted_premiums) / total_volume
|
||||
return avg_premium, total_volume
|
||||
|
Loading…
Reference in New Issue
Block a user