add dynamic trade expiration time

This commit is contained in:
longyu
2022-11-11 22:33:11 +01:00
parent a541943edf
commit d6ed8f1980
2 changed files with 14 additions and 8 deletions

View File

@@ -244,7 +244,7 @@ class FreqaiDataKitchen:
self.data["filter_drop_index_training"] = drop_index
else:
if len(self.data['constant_features_list']):
if len(self.data.get('constant_features_list', [])):
filtered_df = self.check_pred_labels(filtered_df)
# we are backtesting so we need to preserve row number to send back to strategy,
# so now we use do_predict to avoid any prediction based on a NaN