SpectralStrategy更新:FG品种

This commit is contained in:
2025-12-03 00:18:04 +08:00
parent eac656005d
commit 6e64cc69ce
8 changed files with 4712 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
# 策略配置Python格式
from src.indicators.indicators import ZScoreATR, Hurst
CONFIG = {
"name": "傅里叶趋势策略",
"version": "1.0",
"enabled": True,
"strategy_class": "futures_trading_strategies.FG.Spectral.SpectralTrendStrategy3.SpectralTrendStrategy",
"engine_params": {
"symbol": "KQ.m@CZCE.FG",
"duration_seconds": 900,
"roll_over_mode": True,
"history_length": 1000,
# 支持Python对象
"close_bar_delta": __import__('datetime').timedelta(minutes=58)
},
"strategy_params": {
'main_symbol': 'FG', # <-- 替换为你的交易品种代码,例如 'GC=F' (黄金期货), 'ZC=F' (玉米期货)
'trade_volume': 1,
# 'order_direction': ['SELL', 'BUY'],
'indicators': Hurst(115, 0, 0.5),
# 'model_indicator': ADX(7, 0, 30),
'bars_per_day': 23,
'spectral_window_days': 9, # STFT窗口大小(天)
'low_freq_days': 9, # 低频下限(天)
'high_freq_days': 4, # 高频上限(天)
'trend_strength_threshold': 0.6, # 相变临界值
'exit_threshold': 0.3, # 退出阈值
'enable_log': True,
'reverse': False,
}
}