update example config/strat

This commit is contained in:
robcaulk 2022-06-07 19:54:45 +02:00
parent 15d049cffe
commit f8f25e36ef
2 changed files with 10 additions and 9 deletions

View File

@ -66,8 +66,8 @@
"1h"
],
"train_period": 20,
"backtest_period": 2,
"identifier": "example2",
"backtest_period": 0.001,
"identifier": "constant_retrain_live",
"live_trained_timestamp": 0,
"corr_pairlist": [
"BTC/USDT:USDT",
@ -76,20 +76,20 @@
"feature_parameters": {
"period": 20,
"shift": 2,
"DI_threshold": 0,
"DI_threshold": 0.9,
"weight_factor": 0.9,
"principal_component_analysis": false,
"use_SVM_to_remove_outliers": true,
"stratify": 0,
"indicator_max_period": 20,
"indicator_periods": [10, 20, 30]
"indicator_periods": [10, 20]
},
"data_split_parameters": {
"test_size": 0.33,
"random_state": 1
},
"model_training_parameters": {
"n_estimators": 200,
"n_estimators": 1000,
"task_type": "CPU"
}
},

View File

@ -47,7 +47,7 @@ class FreqaiExampleStrategy(IStrategy):
stoploss = -0.05
use_exit_signal = True
startup_candle_count: int = 300
can_short = False
can_short = True
linear_roi_offset = DecimalParameter(0.00, 0.02, default=0.005, space='sell',
optimize=False, load=True)
@ -178,8 +178,8 @@ class FreqaiExampleStrategy(IStrategy):
# each training period.
dataframe = self.model.bridge.start(dataframe, metadata, self)
dataframe["target_roi"] = dataframe["target_mean"] + dataframe["target_std"]
dataframe["sell_roi"] = dataframe["target_mean"] - dataframe["target_std"]
dataframe["target_roi"] = dataframe["target_mean"] + dataframe["target_std"] * 1.25
dataframe["sell_roi"] = dataframe["target_mean"] - dataframe["target_std"] * 1.25
return dataframe
def populate_entry_trend(self, df: DataFrame, metadata: dict) -> DataFrame:
@ -245,7 +245,8 @@ class FreqaiExampleStrategy(IStrategy):
entry_tag = trade.enter_tag
if 'prediction' + entry_tag not in pair_dict[pair] or pair_dict[pair]['prediction' + entry_tag] > 0::
if ('prediction' + entry_tag not in pair_dict[pair] or
pair_dict[pair]['prediction' + entry_tag] > 0):
with self.model.bridge.lock:
pair_dict[pair]['prediction' + entry_tag] = abs(trade_candle['prediction'])
if not follow_mode: