Switch from volitility to price tomorrow
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user