fix backtesting bug, undo move of label stat calc, fix example strat exit logic

This commit is contained in:
robcaulk
2022-07-29 17:27:35 +02:00
parent 08d3ac7ef8
commit f22b140782
4 changed files with 12 additions and 15 deletions

View File

@@ -56,6 +56,8 @@ class BaseRegressionModel(IFreqaiModel):
f"{end_date}--------------------")
# split data into train/test data.
data_dictionary = dk.make_train_test_datasets(features_filtered, labels_filtered)
if not self.freqai_info.get('fit_live_predictions', 0) or not self.live:
dk.fit_labels()
# normalize all data based on train_dataset only
data_dictionary = dk.normalize_data(data_dictionary)
@@ -75,8 +77,6 @@ class BaseRegressionModel(IFreqaiModel):
if self.freqai_info.get('fit_live_predictions_candles', 0) and self.live:
self.fit_live_predictions(dk)
else:
dk.fit_labels()
self.dd.save_historic_predictions_to_disk()