mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-18 13:28:22 +00:00
fix(DataLoader): sort the data before merging (this corrupted the pipeline completely)
This commit is contained in:
@@ -18,7 +18,9 @@ from .fractional_differentiation import (
|
||||
)
|
||||
|
||||
__presets = dict(
|
||||
debug_future_lookahead=[("debug_future", feature_debug_future_lookahead, [1])],
|
||||
debug_future_lookahead=[
|
||||
("debug_future", feature_debug_future_lookahead, [1, 5, 10])
|
||||
],
|
||||
single_mom=[("mom", feature_mom, [30])],
|
||||
single_vol=[("vol", feature_vol, [30])],
|
||||
mom=[("mom", feature_mom, [100, 300, 600, 900, 1800])],
|
||||
|
||||
@@ -4,7 +4,7 @@ from feature_extractors.utils import get_close_low_high
|
||||
|
||||
|
||||
def feature_debug_future_lookahead(df: pd.DataFrame, period: int) -> pd.Series:
|
||||
return df["returns"].shift(-period)
|
||||
return df["returns"].rolling(window=pd.api.indexers.FixedForwardWindowIndexer(window_size=period)).sum()
|
||||
|
||||
|
||||
def feature_lag(df: pd.DataFrame, period: int) -> pd.Series:
|
||||
|
||||
Reference in New Issue
Block a user