move price assignment to feature_engineering_standard() to reduce un-requested feature additions in RL. Ensure old method of price assignment still works, add deprecation warning to help users migrate their strategies
This commit is contained in:
@@ -35,11 +35,6 @@ class freqai_rl_test_strat(IStrategy):
|
||||
dataframe["%-pct-change"] = dataframe["close"].pct_change()
|
||||
dataframe["%-raw_volume"] = dataframe["volume"]
|
||||
|
||||
dataframe["%-raw_close"] = dataframe["close"]
|
||||
dataframe["%-raw_open"] = dataframe["open"]
|
||||
dataframe["%-raw_high"] = dataframe["high"]
|
||||
dataframe["%-raw_low"] = dataframe["low"]
|
||||
|
||||
return dataframe
|
||||
|
||||
def feature_engineering_standard(self, dataframe, **kwargs):
|
||||
@@ -47,6 +42,11 @@ class freqai_rl_test_strat(IStrategy):
|
||||
dataframe["%-day_of_week"] = dataframe["date"].dt.dayofweek
|
||||
dataframe["%-hour_of_day"] = dataframe["date"].dt.hour
|
||||
|
||||
dataframe["%-raw_close"] = dataframe["close"]
|
||||
dataframe["%-raw_open"] = dataframe["open"]
|
||||
dataframe["%-raw_high"] = dataframe["high"]
|
||||
dataframe["%-raw_low"] = dataframe["low"]
|
||||
|
||||
return dataframe
|
||||
|
||||
def set_freqai_targets(self, dataframe, **kwargs):
|
||||
|
Reference in New Issue
Block a user