From fc10ad0108d43afa419ee80bb0d0e0592dae3bc5 Mon Sep 17 00:00:00 2001 From: zhangkun Date: Sat, 14 Feb 2026 21:11:07 +0800 Subject: [PATCH] up congig --- config_examples/freqaiprimer.json | 62 +++++---- .../live_XGBoostRegressorMultiTarget.json | 128 ++++++++++-------- tools/backtest.sh | 8 +- 3 files changed, 113 insertions(+), 85 deletions(-) diff --git a/config_examples/freqaiprimer.json b/config_examples/freqaiprimer.json index 48933ccc..795073ef 100644 --- a/config_examples/freqaiprimer.json +++ b/config_examples/freqaiprimer.json @@ -72,56 +72,72 @@ "data_kitchen": { "fillna": "ffill" }, + "freqaimodel": "XGBoostRegressorMultiTarget", "purge_old_models": 2, - "train_period_days": 12, + "train_period_days": 14, "backtest_period_days": 2, "live_retrain_hours": 2, "outlier_detection": { "method": "IsolationForest", - "contamination": 0.1 + "contamination": 0.2 }, "feature_selection": { - "method": "recursive_elimination" + "method": "recursive_elimination", + "feature_number": 15 }, "feature_parameters": { "include_timeframes": [ "3m", "15m", - "1h" + "1h", + "4h" ], "include_corr_pairlist": [ - "BTC/USDT", - "SOL/USDT" + "XAUT/USDT", ], - "outlier_protection_percentage": 0.1, + "outlier_protection_percentage": 0.2, "label_period_candles": 100, - "include_shifted_candles": 3, + "include_shifted_candles": 2, "DI_threshold": 0.5, - "weight_factor": 0.9, - "principal_component_analysis": false, + "weight_factor": 0.7, + "principal_component_analysis": true, + "n_components": 0.85, "use_SVM_to_remove_outliers": true, "indicator_periods_candles": [ 10, 20, 50 ], - "plot_feature_importances": 10 + "plot_feature_importances": 10, + "shuffle_after_split": false, + "buffer_train_data_candles": 0, + "smooth_features": true, + "smooth_window": 5 }, "data_split_parameters": { - "test_size": 0.15, - "shuffle": false + "test_size": 0.25, + "shuffle": false }, "model_training_parameters": { - "n_estimators": 600, - "learning_rate": 0.02, - "num_leaves": 60, - "max_depth": 12, - "min_data_in_leaf": 15, - "feature_fraction": 0.8, - "bagging_fraction": 0.8, - "bagging_freq": 5, - "verbose": -1 - } + "n_estimators": 150, + "learning_rate": 0.025, + "max_depth": 4, + "min_child_weight": 5, + "subsample": 0.6, + "colsample_bytree": 0.6, + "reg_alpha": 0.5, + "reg_lambda": 2.0, + "verbosity": 0 + }, + "identifier": "live-freqai", + "write_metrics_to_disk": false, + "conv_width": 1, + "expiration_hours": 0, + "save_backtest_models": false, + "activate_tensorboard": true, + "wait_for_training_iteration_on_reload": true, + "continual_learning": false, + "keras": false }, "api_server": { "enabled": true, diff --git a/config_examples/live_XGBoostRegressorMultiTarget.json b/config_examples/live_XGBoostRegressorMultiTarget.json index c1823105..0bf5ba96 100644 --- a/config_examples/live_XGBoostRegressorMultiTarget.json +++ b/config_examples/live_XGBoostRegressorMultiTarget.json @@ -71,64 +71,76 @@ "use_order_book": false }, "freqai": { - "enabled": true, - "data_kitchen": { - "fillna": "ffill" - }, - "freqaimodel": "XGBoostRegressorMultiTarget", - "purge_old_models": 2, - "identifier": "live-freqai", - "train_period_days": 18, - "backtest_period_days": 2, - "live_retrain_hours": 2, - "outlier_detection": { - "method": "IsolationForest", - "contamination": 0.15 - }, - "feature_selection": { - "method": "recursive_elimination", - "feature_number": 20 - }, - "feature_parameters": { - "include_timeframes": [ - "3m", - "15m", - "1h", - "4h" - ], - "include_corr_pairlist": [ - "XAUT/USDT", - "BTC/USDT" - ], - "outlier_protection_percentage": 0.1, - "label_period_candles": 100, - "include_shifted_candles": 2, - "DI_threshold": 0.5, - "weight_factor": 0.9, - "principal_component_analysis": true, - "use_SVM_to_remove_outliers": true, - "indicator_periods_candles": [ - 10, - 20, - 50 - ], - "plot_feature_importances": 10 - }, - "data_split_parameters": { - "test_size": 0.2, - "shuffle": false - }, - "model_training_parameters": { - "n_estimators": 200, - "learning_rate": 0.05, - "max_depth": 5, - "min_child_weight": 3, - "subsample": 0.7, - "colsample_bytree": 0.7, - "verbosity": 0, - "reg_alpha": 0.1, - "reg_lambda": 1.0 - } + "enabled": true, + "data_kitchen": { + "fillna": "ffill" + }, + "freqaimodel": "XGBoostRegressorMultiTarget", + "purge_old_models": 2, + "train_period_days": 14, + "backtest_period_days": 2, + "live_retrain_hours": 2, + "outlier_detection": { + "method": "IsolationForest", + "contamination": 0.2 + }, + "feature_selection": { + "method": "recursive_elimination", + "feature_number": 15 + }, + "feature_parameters": { + "include_timeframes": [ + "3m", + "15m", + "1h", + "4h" + ], + "include_corr_pairlist": [ + "XAUT/USDT", + ], + "outlier_protection_percentage": 0.2, + "label_period_candles": 100, + "include_shifted_candles": 2, + "DI_threshold": 0.5, + "weight_factor": 0.7, + "principal_component_analysis": true, + "n_components": 0.85, + "use_SVM_to_remove_outliers": true, + "indicator_periods_candles": [ + 10, + 20, + 50 + ], + "plot_feature_importances": 10, + "shuffle_after_split": false, + "buffer_train_data_candles": 0, + "smooth_features": true, + "smooth_window": 5 + }, + "data_split_parameters": { + "test_size": 0.25, + "shuffle": false + }, + "model_training_parameters": { + "n_estimators": 150, + "learning_rate": 0.025, + "max_depth": 4, + "min_child_weight": 5, + "subsample": 0.6, + "colsample_bytree": 0.6, + "reg_alpha": 0.5, + "reg_lambda": 2.0, + "verbosity": 0 + }, + "identifier": "live-freqai", + "write_metrics_to_disk": false, + "conv_width": 1, + "expiration_hours": 0, + "save_backtest_models": false, + "activate_tensorboard": true, + "wait_for_training_iteration_on_reload": true, + "continual_learning": false, + "keras": false }, "fee": 0.0008, "api_server": { diff --git a/tools/backtest.sh b/tools/backtest.sh index 860c7fb9..f10a606d 100755 --- a/tools/backtest.sh +++ b/tools/backtest.sh @@ -136,7 +136,7 @@ if [ -n "$PAIR_REMOTE_LIST_URL" ]; then echo "Using pairs from --pairs parameter: $PAIRS_ARG" else # 使用默认的交易对列表 - DEFAULT_PAIRS="BTC/USDT TON/USDT DOT/USDT XRP/USDT OKB/USDT SOL/USDT DOGE/USDT WCT/USDT TRUMP/USDT SUI/USDT PEPE/USDT TRB/USDT MASK/USDT UNI/USDT KAITO/USDT XAUT/USDT" + DEFAULT_PAIRS="BTC/USDT TON/USDT DOT/USDT XRP/USDT OKB/USDT SOL/USDT WCT/USDT TRUMP/USDT SUI/USDT PEPE/USDT TRB/USDT MASK/USDT UNI/USDT KAITO/USDT XAUT/USDT" PAIRS_FLAG="--pairs $DEFAULT_PAIRS" echo "Using default pairs: $DEFAULT_PAIRS" fi @@ -161,7 +161,7 @@ print(' '.join(pairs) if pairs else '') echo "Using pairs from --pairs parameter: $PAIRS_ARG" else # 使用默认的交易对列表 - DEFAULT_PAIRS="BTC/USDT TON/USDT DOT/USDT XRP/USDT OKB/USDT SOL/USDT DOGE/USDT WCT/USDT TRUMP/USDT SUI/USDT PEPE/USDT TRB/USDT MASK/USDT UNI/USDT KAITO/USDT XAUT/USDT" + DEFAULT_PAIRS="BTC/USDT TON/USDT DOT/USDT XRP/USDT OKB/USDT SOL/USDT WCT/USDT TRUMP/USDT SUI/USDT PEPE/USDT TRB/USDT MASK/USDT UNI/USDT KAITO/USDT XAUT/USDT" PAIRS_FLAG="--pairs $DEFAULT_PAIRS" echo "Using default pairs: $DEFAULT_PAIRS" fi @@ -173,7 +173,7 @@ elif [ -n "$PAIRS_ARG" ]; then echo "Using pairs from --pairs parameter: $PAIRS_ARG" else # 没有提供任何交易对参数,使用默认值 - DEFAULT_PAIRS="BTC/USDT TON/USDT DOT/USDT XRP/USDT OKB/USDT SOL/USDT DOGE/USDT WCT/USDT TRUMP/USDT SUI/USDT PEPE/USDT TRB/USDT MASK/USDT UNI/USDT KAITO/USDT XAUT/USDT" + DEFAULT_PAIRS="BTC/USDT TON/USDT DOT/USDT TRUMP/USDT SUI/USDT UNI/USDT XAUT/USDT" PAIRS_FLAG="--pairs $DEFAULT_PAIRS" echo "No pairs parameter provided, using default pairs: $DEFAULT_PAIRS" fi @@ -203,7 +203,7 @@ echo "docker-compose run --rm freqtrade backtesting $PAIRS_FLAG \ docker-compose run --rm freqtrade backtesting $PAIRS_FLAG \ --logfile /freqtrade/user_data/logs/freqtrade.log \ --freqaimodel $FREQAI_MODEL \ - --config /freqtrade/config_examples/freqaiprimer_${FREQAI_MODEL}.json \ + --config /freqtrade/config_examples/freqaiprimer.json \ --config /freqtrade/config_examples/$CONFIG_FILE \ --config /freqtrade/templates/freqaiprimer_${FREQAI_MODEL}.json \ --strategy-path /freqtrade/templates \