Skip to content

Commit

Permalink
Updating stats metrics for weighting on tstat
Browse files Browse the repository at this point in the history
  • Loading branch information
trdougherty committed Feb 24, 2025
1 parent 0254435 commit 0fa8c75
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions vali_objects/utils/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def omega(log_returns: list[float], bypass_confidence: bool = False, weighting:
return float(numerator / denominator)

@staticmethod
def statistical_confidence(log_returns: list[float], bypass_confidence: bool = False, weighting: bool = False, **kwargs) -> float:
def statistical_confidence(log_returns: list[float], bypass_confidence: bool = False, **kwargs) -> float:
"""
Args:
log_returns: list of daily log returns from the miner
Expand All @@ -254,10 +254,6 @@ def statistical_confidence(log_returns: list[float], bypass_confidence: bool = F
if not bypass_confidence or len(log_returns) < 2:
return ValiConfig.STATISTICAL_CONFIDENCE_NOCONFIDENCE_VALUE

if weighting:
# Weighted distribution
log_returns = Metrics.weighted_log_returns(log_returns)

# Also now check for zero variance condition
zero_variance_condition = bool(np.isclose(np.var(log_returns), 0))
if zero_variance_condition:
Expand Down

0 comments on commit 0fa8c75

Please sign in to comment.