Files

31 lines
1.1 KiB
Python
Raw Permalink Normal View History

2025-11-21 16:08:03 +08:00
# 策略配置Python格式
from src.indicators.indicators import ZScoreATR
CONFIG = {
"name": "傅里叶趋势策略",
"version": "1.0",
"enabled": True,
"strategy_class": "futures_trading_strategies.SA.Spectral.SpectralTrendStrategy.SpectralTrendStrategy",
"engine_params": {
"symbol": "KQ.m@CZCE.SA",
"duration_seconds": 900,
"roll_over_mode": True,
"history_length": 1000,
# 支持Python对象
"close_bar_delta": __import__('datetime').timedelta(minutes=58)
},
"strategy_params": {
'main_symbol': 'SA', # <-- 替换为你的交易品种代码,例如 'GC=F' (黄金期货), 'ZC=F' (玉米期货)
2025-12-05 00:40:19 +08:00
'trade_volume': 3,
2025-11-21 16:08:03 +08:00
'model_indicator': ZScoreATR(14, 100, 0.5, 3),
'spectral_window_days': 8, # STFT窗口大小(天)
'low_freq_days': 8, # 低频下限(天)
'high_freq_days': 4, # 高频上限(天)
'trend_strength_threshold': 0.7, # 相变临界值
'exit_threshold': 0.3, # 退出阈值
'enable_log': True
}
}