Hyperopt参数优化
This commit is contained in:
parent
5d75e1bad7
commit
eb610703fb
@ -1,56 +1,58 @@
|
||||
{
|
||||
"strategy_name": "FreqaiPrimer",
|
||||
"export_time": "2025-12-03 00:03:56.464370+00:00",
|
||||
"ft_stratparam_v": 1,
|
||||
"params": {
|
||||
"roi": {},
|
||||
"stoploss": {
|
||||
"stoploss": -0.085
|
||||
},
|
||||
"trailing": {
|
||||
"trailing_stop": true,
|
||||
"trailing_stop_positive": 0.012,
|
||||
"trailing_stop_positive_offset": 0.025,
|
||||
"trailing_only_offset_is_reached": true
|
||||
"buy": {
|
||||
"add_bb_lower_proximity": 1.05,
|
||||
"add_position_callback": 0.087,
|
||||
"add_position_decrease_ratio": 0.56,
|
||||
"add_rsi_oversold_threshold": 18,
|
||||
"add_stochrsi_oversold": 17,
|
||||
"adjust_multiplier": 1.48,
|
||||
"bb_length": 45,
|
||||
"bb_lower_deviation": 1.037,
|
||||
"bb_std": 3.67,
|
||||
"bb_width_threshold": 0.014,
|
||||
"h1_max_candles": 35,
|
||||
"h1_max_consecutive_candles": 1,
|
||||
"h1_rapid_rise_threshold": 0.175,
|
||||
"max_entry_adjustments": 6,
|
||||
"min_condition_count": 2,
|
||||
"rsi_bull_threshold": 53,
|
||||
"rsi_length": 26,
|
||||
"rsi_oversold": 21,
|
||||
"stochrsi_bull_threshold": 47,
|
||||
"stochrsi_neutral_threshold": 24,
|
||||
"volume_multiplier": 3.8
|
||||
},
|
||||
"max_open_trades": {
|
||||
"max_open_trades": 5
|
||||
},
|
||||
"buy": {
|
||||
"add_bb_lower_proximity": 0.871,
|
||||
"add_position_callback": 0.057,
|
||||
"add_position_decrease_ratio": 0.71,
|
||||
"add_rsi_oversold_threshold": 37,
|
||||
"add_stochrsi_oversold": 14,
|
||||
"adjust_multiplier": 0.87,
|
||||
"bb_length": 58,
|
||||
"bb_lower_deviation": 0.931,
|
||||
"bb_std": 4.4,
|
||||
"bb_width_threshold": 0.016,
|
||||
"h1_max_candles": 40,
|
||||
"h1_max_consecutive_candles": 1,
|
||||
"h1_rapid_rise_threshold": 0.166,
|
||||
"max_entry_adjustments": 6,
|
||||
"min_condition_count": 2,
|
||||
"rsi_bull_threshold": 44,
|
||||
"rsi_length": 30,
|
||||
"rsi_oversold": 27,
|
||||
"stochrsi_bull_threshold": 33,
|
||||
"stochrsi_neutral_threshold": 18,
|
||||
"volume_multiplier": 3.4
|
||||
},
|
||||
"protection": {},
|
||||
"roi": {},
|
||||
"sell": {
|
||||
"exit_bb_upper_deviation": 0.913,
|
||||
"exit_profit_tier1": 0.034,
|
||||
"exit_profit_tier2": 0.17,
|
||||
"exit_reduce_tier1": 0.35,
|
||||
"exit_reduce_tier2": 0.37,
|
||||
"exit_bb_upper_deviation": 0.9,
|
||||
"exit_profit_tier1": 0.06,
|
||||
"exit_profit_tier2": 0.138,
|
||||
"exit_reduce_tier1": 0.49,
|
||||
"exit_reduce_tier2": 0.23,
|
||||
"exit_rsi_threshold": 57,
|
||||
"exit_volume_multiplier": 2,
|
||||
"exit_volume_multiplier": 3.3,
|
||||
"max_reduce_adjustments": 4,
|
||||
"reduce_coefficient": 0.229,
|
||||
"reduce_profit_base": 0.02
|
||||
"reduce_coefficient": 0.263,
|
||||
"reduce_profit_base": 0.038
|
||||
},
|
||||
"protection": {}
|
||||
"stoploss": {
|
||||
"stoploss": -0.085
|
||||
},
|
||||
"trailing": {
|
||||
"trailing_only_offset_is_reached": true,
|
||||
"trailing_stop": true,
|
||||
"trailing_stop_positive": 0.012,
|
||||
"trailing_stop_positive_offset": 0.025
|
||||
}
|
||||
},
|
||||
"ft_stratparam_v": 1,
|
||||
"export_time": "2025-12-03 00:03:56.464370+00:00"
|
||||
}
|
||||
"strategy_name": "FreqaiPrimer",
|
||||
"trailing_only_offset_is_reached": false,
|
||||
"trailing_stop": false
|
||||
}
|
||||
@ -95,7 +95,7 @@ class FreqaiPrimer(IStrategy):
|
||||
# [propertiesGrp step="2" name="第二轮优化 - 剧烈拉升检测" epochs="240" space="buy" description="防追高核心参数,绝对不能放宽!"]
|
||||
rsi_oversold = IntParameter(20, 50, default=23, optimize=True, load=True, space='buy') # 安全:20-50
|
||||
rsi_bull_threshold = IntParameter(40, 68, default=45, optimize=True, load=True, space='buy') # 安全:40-68
|
||||
stochrsi_neutral_threshold = IntParameter(15, 40, default=16, optimize=True, load=True, space='buy') # 安全:15-40
|
||||
stochrsi_neutral_threshold = IntParameter(15, 40, default=24, optimize=True, load=True, space='buy') # 安全:15-40
|
||||
bb_width_threshold = DecimalParameter(0.003, 0.030, decimals=3, default=0.011, optimize=True, load=True, space='buy') # 安全:0.003-0.030
|
||||
h1_max_candles = IntParameter(16, 50, default=19, optimize=True, load=True, space='buy') # 黄金区间!绝不能超过50
|
||||
h1_rapid_rise_threshold = DecimalParameter(0.08, 0.22, decimals=3, default=0.192, optimize=True, load=True, space='buy') # 0.08-0.22 实盘最稳
|
||||
@ -104,10 +104,10 @@ class FreqaiPrimer(IStrategy):
|
||||
|
||||
# [propertiesGrp step="3" name="第三轮优化 - 加仓策略" epochs="220" space="buy" description="加仓精准度与金额管理,严防爆仓"]
|
||||
add_position_callback = DecimalParameter(0.047, 0.090, decimals=3, default=0.067, optimize=True, load=True, space='buy') # 2.5%-7.0% 回调才加
|
||||
add_rsi_oversold_threshold = IntParameter(15, 40, default=23, optimize=True, load=True, space='buy') # 不能太低
|
||||
add_rsi_oversold_threshold = IntParameter(15, 40, default=18, optimize=True, load=True, space='buy') # 不能太低
|
||||
add_stochrsi_oversold = IntParameter(10, 35, default=23, optimize=True, load=True, space='buy')
|
||||
add_bb_lower_proximity = DecimalParameter(0.85, 1.20, decimals=3, default=0.987, optimize=True, load=True, space='buy') # 不能离下轨太远
|
||||
add_position_decrease_ratio= DecimalParameter(0.30, 0.80, decimals=2, default=0.55, optimize=True, load=True, space='buy') # 递减比例别太激进
|
||||
add_position_decrease_ratio= DecimalParameter(0.30, 0.80, decimals=2, default=0.56, optimize=True, load=True, space='buy') # 递减比例别太激进
|
||||
max_entry_adjustments = IntParameter(2, 7, default=6, optimize=True, load=True, space='buy') # 最多7次加仓,防爆仓
|
||||
adjust_multiplier = DecimalParameter(0.6, 1.6, decimals=2, default=0.98, optimize=True, load=True, space='buy') # 别让加仓金额指数爆炸
|
||||
# [/propertiesGrp]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user