- 0
- 0
- 约3.39千字
- 约 30页
- 2022-12-01 发布于上海
- 举报
投资组合最优套保比计算策略;目 录;策略背景——市场情况;策略背景——策略原理;策略背景——策略流程;策略开发;Stkcd.xml配置
Strategy
code ContractMultiplier= Currency=CNY MarginLevel=1 MaxShare= exchangeType=
id=HS300 name=沪深300成分股/
code ContractMultiplier= Currency=CNY MarginLevel=1 MaxShare=
exchangeType=ExchangeType.CFFEX id=IF1305 name=IF1305/
/Strategy
每个code标签下,ContractMultiplier、Currency、MarginLevel、MaxShare、为实时交易部分配置,历史回验设置无效。
ContractMultiplier:合约乘数
Currency:货币种类
MarginLevel:交易保证金比例
MaxShare:当前合约的最大持仓量
exchangeType 表示市场类型枚举
id:交易标的代码
;StrategyCfg.xml配置
?xml version=1.0 encoding=utf-8?
Strategy
strategyFunction name=optimalRatio/
strategyArguments rebalanceCycle=1 returnCalFrequency=TimeIntervals.DAY01/
FactorDataCfg dateListType=DateListType.Trading localPath=localPath
periodType=PeriodType.StockTradingPeriod tickerList=Stkcd_optimalRatio.xml/
data decisionDataLength=1 fieldname=CP frequency=TimeIntervals.DAY01/
data decisionDataLength=30 fieldname=Rtn frequency=TimeIntervals.DAY01/
data decisionDataLength=30 fieldname=HS300Weight frequency=TimeIntervals.DAY01/
/Strategy
;策略开发——函数名称及调仓配置;策略开发——策略数据及缓存配置; data decisionDataLength=1 fieldname=CP frequency=TimeIntervals.DAY01/
data decisionDataLength=30 fieldname=Rtn frequency=TimeIntervals.DAY01/
data decisionDataLength=30 fieldname=HS300Weight frequency=TimeIntervals.DAY01/
/Strategy
标签data(用途:策略决策所需数据配置)
策略决策时每需要一种数据,则需要配置一个data标签
decisionDataLength:每次策略函数计算目标持仓权重时所需的改数据长度,必须为大于等于1的整
数;
fieldname:数据的字段名;
frequency:数据的频率,有SEC01(1秒),SEC05(5秒),SEC15(15秒),SEC30(30秒)
,MIN01(1分),MIN05(5分),MIN15(15分),DAY01(1天);
;StrategyCfg.xml配置
?xml version=1.0 encoding=utf-8?
Strategy
strategyFunction name=optimalRatio/
strategyArguments rebalanceCycle=1“
returnCalFrequency=TimeIntervals.DAY01/
FactorDataCfg dateListType=DateListType.Trading localPath=localPath
periodType=PeriodType.StockTradingPeriod tickerList=Stkcd_optimalRatio.xml/
data decisionDataLength=1 fieldname=CP frequency=TimeInt
原创力文档

文档评论(0)