Skip to content

Commit 6a367c3

Browse files
committed
Fix lint
1 parent 94afa73 commit 6a367c3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

quantflow/ta/paths.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def ys(self) -> list[list[float]]:
6161
def path(self, i: int) -> FloatArray:
6262
"""Path i"""
6363
return self.data[:, i]
64-
64+
6565
def dates(
6666
self, *, start: datetime | None = None, unit: str = "d"
6767
) -> pd.DatetimeIndex:
@@ -120,10 +120,14 @@ def integrate(self) -> Paths:
120120
data=cumulative_trapezoid(self.data, dx=self.dt, axis=0, initial=0),
121121
)
122122

123-
def hurst_exponent(self, lags: int | None = None) -> float:
124-
"""Estimate the Hurst exponent of the paths"""
123+
def hurst_exponent(self, steps: int | None = None) -> float:
124+
"""Estimate the Hurst exponent from all paths
125+
126+
:param steps: number of lags to consider, if not provided it uses
127+
half of the time steps capped at 100
128+
"""
125129
ts = self.time_steps // 2
126-
n = min(lags or ts, 100)
130+
n = min(steps or ts, 100)
127131
lags = []
128132
tau = []
129133
for lag in range(2, n):

0 commit comments

Comments
 (0)