复制链接
克隆策略

    {"description":"实验创建于2022/12/17","graph":{"edges":[],"nodes":[{"node_id":"-147","module_id":"BigQuantSpace.test_stategy_asset_allocation.test_stategy_asset_allocation-v17","parameters":[{"name":"stra_dict","value":"{\n 'stockrank':\"stockrank.csv\",\n '多条件选股':\"多条件选股.csv\",\n '多头排列回踩':\"多头排列回踩.csv\"\n}","type":"Literal","bound_global_parameter":null},{"name":"start_date","value":"2021-01-04","type":"Literal","bound_global_parameter":null},{"name":"upper_weight","value":"1","type":"Literal","bound_global_parameter":null},{"name":"lower_weight","value":"0.1","type":"Literal","bound_global_parameter":null},{"name":"target","value":"等权重","type":"Literal","bound_global_parameter":null},{"name":"self_para","value":"","type":"Literal","bound_global_parameter":null},{"name":"balance_period","value":"1个月","type":"Literal","bound_global_parameter":null},{"name":"cal_period","value":"全部历史","type":"Literal","bound_global_parameter":null},{"name":"cal_days","value":"30","type":"Literal","bound_global_parameter":null}],"input_ports":[],"output_ports":[{"name":"data_1","node_id":"-147"},{"name":"data_2","node_id":"-147"}],"cacheable":false,"seq_num":1,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-147' Position='275.1478271484375,142.22824096679688,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [4]:
    # 本代码由可视化策略环境自动生成 2022年12月17日 14:59
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    m1 = M.test_stategy_asset_allocation.v17(
        stra_dict={
        'stockrank':"stockrank.csv",
        '多条件选股':"多条件选股.csv",
        '多头排列回踩':"多头排列回踩.csv"
    },
        start_date='2021-01-04',
        upper_weight=1,
        lower_weight=0.1,
        target='等权重',
        balance_period='1个月',
        cal_period='全部历史',
        cal_days=30
    )
    
    再平衡日期和各策略对应权重:
    2021-01-04 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-02-03 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-03-05 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-04-04 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-05-04 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-06-03 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-07-03 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-08-02 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-09-01 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-10-01 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-10-31 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-11-30 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    2021-12-30 {'stockrank': 0.33, '多条件选股': 0.33, '多头排列回踩': 0.33}
    

    策略绩效指标

    策略名称 收益率 年化收益率 夏普比率 年化波动率 最大回撤 收益回撤比
    stockrank 67.67% 70.91% 1.97 27.29% -15.12% 4.69
    多条件选股 37.14% 38.75% 1.27 25.56% -15.43% 2.51
    多头排列回踩 35.57% 37.11% 1.10 29.59% -22.19% 1.67
    组合收益 48.57% 50.76% 1.87 21.34% -12.19% 4.16