Avi-L commited on
Commit
30d3ad2
·
verified ·
1 Parent(s): 37f6f9b

carry(): add missing vol_window param

Browse files
Files changed (1) hide show
  1. crypto_eval/grid.py +2 -1
crypto_eval/grid.py CHANGED
@@ -80,7 +80,8 @@ def donchian(bars: pd.DataFrame, funding: pd.Series, window: int,
80
 
81
 
82
  def carry(bars: pd.DataFrame, funding: pd.Series, threshold_mult: float = 1.0,
83
- base: float = 1e-4, vol_target: float | None = None) -> pd.Series:
 
84
  """Short the perp when trailing funding > threshold*base, long when < -."""
85
  if isinstance(funding, pd.DataFrame):
86
  funding = funding["funding_rate"]
 
80
 
81
 
82
  def carry(bars: pd.DataFrame, funding: pd.Series, threshold_mult: float = 1.0,
83
+ base: float = 1e-4, vol_target: float | None = None,
84
+ vol_window: int = 720) -> pd.Series:
85
  """Short the perp when trailing funding > threshold*base, long when < -."""
86
  if isinstance(funding, pd.DataFrame):
87
  funding = funding["funding_rate"]