Switch from volitility to price tomorrow

This commit is contained in:
2026-02-17 19:10:56 -08:00
parent b1a64be367
commit 7ff2f994e0
3 changed files with 8 additions and 5 deletions
+3
View File
@@ -23,6 +23,9 @@ def MakeFeatures(df, i):
# Add feature for volitility last 20
df['Volatility_20'] = df['Return'].transform(lambda x: x.rolling(20).std())
# This is our training metric
df['Target_Close_Tomorrow'] = df['Close'].shift(-1).pct_change()
# Return new df with new features
return df