fix bug in backtest, typo in example strat
This commit is contained in:
parent
3599d18ff6
commit
b35c64b6c0
@ -198,7 +198,7 @@ class IFreqaiModel(ABC):
|
|||||||
self.model = self.train(dataframe_train, metadata['pair'], dh)
|
self.model = self.train(dataframe_train, metadata['pair'], dh)
|
||||||
self.data_drawer.pair_dict[metadata['pair']][
|
self.data_drawer.pair_dict[metadata['pair']][
|
||||||
'trained_timestamp'] = trained_timestamp.stopts
|
'trained_timestamp'] = trained_timestamp.stopts
|
||||||
dh.set_new_model_names(metadata, trained_timestamp)
|
dh.set_new_model_names(metadata['pair'], trained_timestamp)
|
||||||
dh.save_data(self.model, metadata['pair'])
|
dh.save_data(self.model, metadata['pair'])
|
||||||
else:
|
else:
|
||||||
self.model = dh.load_data(metadata['pair'])
|
self.model = dh.load_data(metadata['pair'])
|
||||||
|
@ -100,7 +100,7 @@ class FreqaiExampleStrategy(IStrategy):
|
|||||||
informative[f"{coin}20sma-period_{t}"] = ta.SMA(informative, timeperiod=t)
|
informative[f"{coin}20sma-period_{t}"] = ta.SMA(informative, timeperiod=t)
|
||||||
informative[f"{coin}21ema-period_{t}"] = ta.EMA(informative, timeperiod=t)
|
informative[f"{coin}21ema-period_{t}"] = ta.EMA(informative, timeperiod=t)
|
||||||
informative[f"%-{coin}close_over_20sma-period_{t}"] = (
|
informative[f"%-{coin}close_over_20sma-period_{t}"] = (
|
||||||
informative["close"] / informative[coin + "20sma-period_{t}"]
|
informative["close"] / informative[f"{coin}20sma-period_{t}"]
|
||||||
)
|
)
|
||||||
|
|
||||||
informative[f"%-{coin}mfi-period_{t}"] = ta.MFI(informative, timeperiod=t)
|
informative[f"%-{coin}mfi-period_{t}"] = ta.MFI(informative, timeperiod=t)
|
||||||
|
Loading…
Reference in New Issue
Block a user