it's an error not to provide halving dates
This commit is contained in:
@@ -28,6 +28,9 @@ def get_cycle_position(date, halving_dates):
|
||||
Calculate position in halving cycle (0 to 1) for a given date.
|
||||
0 represents a halving event, 1 represents just before the next halving.
|
||||
"""
|
||||
if len(halving_dates) == 0:
|
||||
raise Exception("halving dates cannot be empty")
|
||||
|
||||
# Convert date to datetime if it's not already
|
||||
date = pd.to_datetime(date)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user