第四轮优化完成, 准备优化ROI

This commit is contained in:
Ubuntu 2025-10-23 15:08:05 +00:00
parent ec21798d59
commit 124935e9c5
3 changed files with 18 additions and 18 deletions

View File

@ -15,34 +15,34 @@
"max_open_trades": 5
},
"buy": {
"add_position_callback": 0.03,
"adjust_multiplier": 0.59,
"bb_length": 28,
"bb_lower_deviation": 1.03,
"bb_std": 2.9,
"bb_width_threshold": 0.013,
"h1_max_candles": 260,
"h1_max_consecutive_candles": 2,
"h1_rapid_rise_threshold": 0.148,
"max_entry_adjustments": 4,
"min_condition_count": 2,
"rsi_bull_threshold": 53,
"rsi_length": 18,
"rsi_oversold": 40,
"stochrsi_bull_threshold": 33,
"stochrsi_neutral_threshold": 26,
"volume_multiplier": 1.5,
"add_position_callback": 0.03,
"adjust_multiplier": 0.59,
"h1_max_candles": 260,
"h1_max_consecutive_candles": 2,
"h1_rapid_rise_threshold": 0.148,
"max_entry_adjustments": 4
"volume_multiplier": 1.5
},
"sell": {
"exit_bb_upper_deviation": 0.99,
"exit_volume_multiplier": 1.7,
"max_reduce_adjustments": 1,
"reduce_coefficient": 0.25,
"reduce_profit_base": 0.075,
"exit_volume_multiplier": 2.2,
"max_reduce_adjustments": 3,
"reduce_coefficient": 0.289,
"reduce_profit_base": 0.05,
"rsi_overbought": 58
},
"protection": {}
},
"ft_stratparam_v": 1,
"export_time": "2025-10-23 07:40:27.667437+00:00"
"export_time": "2025-10-23 15:06:26.823465+00:00"
}

View File

@ -119,13 +119,13 @@ class FreqaiPrimer(IStrategy):
# 第四轮优化:
# 出场条件阈值参数
exit_bb_upper_deviation = DecimalParameter(0.98, 1.02, decimals=2, default=0.99, optimize=True, load=True, space='sell')
exit_volume_multiplier = DecimalParameter(1.5, 3.0, decimals=1, default=1.7, optimize=True, load=True, space='sell')
exit_volume_multiplier = DecimalParameter(1.5, 3.0, decimals=1, default=2.2, optimize=True, load=True, space='sell')
rsi_overbought = IntParameter(57, 59, default=58, optimize=True, load=True, space='sell')
# 简化后的减仓Hyperopt参数
reduce_profit_base = DecimalParameter(0.05, 0.12, default=0.075, space='sell', optimize=True) # 减仓基础盈利阈值触发门槛默认7.5%
reduce_coefficient = DecimalParameter(0.1, 0.6, default=0.25, space='sell', optimize=True) # 减仓金额系数默认0.25,控制初始金额)
max_reduce_adjustments = IntParameter(1, 3, default=1, space='sell', optimize=True) # 最大减仓次数默认1次避免过度减仓
reduce_profit_base = DecimalParameter(0.05, 0.12, default=0.05, space='sell', optimize=True) # 减仓基础盈利阈值触发门槛默认7.5%
reduce_coefficient = DecimalParameter(0.1, 0.6, default=0.289, space='sell', optimize=True) # 减仓金额系数默认0.25,控制初始金额)
max_reduce_adjustments = IntParameter(1, 3, default=3, space='sell', optimize=True) # 最大减仓次数默认1次避免过度减仓
def informative_pairs(self):

View File

@ -335,9 +335,9 @@ docker-compose run --rm freqtrade hyperopt $PAIRS_FLAG \
--enable-protections \
--strategy-path /freqtrade/templates \
--timerange ${START_DATE}-${END_DATE} \
--random-state 45 \
--random-state 13 \
-e 2500 \
-j 6 \
--hyperopt-loss CalmarHyperOptLoss \
--spaces sell \
--spaces roi \
--fee 0.001