Files
NewQuant/strategy_manager/strategies/KalmanStrategy/rb.py

27 lines
871 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 策略配置Python格式
from src.indicators.indicators import *
CONFIG = {
"name": "卡尔曼策略",
"version": "1.0",
"enabled": True,
"strategy_class": "futures_trading_strategies.rb.KalmanStrategy.KalmanStrategy2.DualModeKalmanStrategy",
"engine_params": {
"symbol": "KQ.m@SHFE.rb",
"duration_seconds": 900,
"roll_over_mode": True,
"history_length": 1000,
# 支持Python对象
"close_bar_delta": __import__('datetime').timedelta(minutes=58)
},
"strategy_params": {
'main_symbol': 'rb', # <-- 替换为你的交易品种代码,例如 'GC=F' (黄金期货), 'ZC=F' (玉米期货)
'trade_volume': 2,
'order_direction': ['SELL', 'BUY'],
'indicators': [PriceRangeToVolatilityRatio(7, 21, 4, 5), PriceRangeToVolatilityRatio(7, 21, 4, 5)],
'enable_log': True
}
}