mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-20 22:38:10 +00:00
chore(Linter): reformatted code with black (#211)
* chore(Linter): reformatted code with black * Create black.yaml
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import pandas as pd
|
||||
from data_loader.types import ForwardReturnSeries
|
||||
|
||||
|
||||
def create_forward_returns(series: pd.Series, period: int) -> ForwardReturnSeries:
|
||||
assert period > 0
|
||||
indexer = pd.api.indexers.FixedForwardWindowIndexer(window_size=period)
|
||||
|
||||
|
||||
forward_returns = series.rolling(window=indexer).sum()
|
||||
return forward_returns
|
||||
return forward_returns
|
||||
|
||||
Reference in New Issue
Block a user