コード例 #1
0
def test_tc_bps(rebal_weights, panel, manual_tc_bps):
    vw_tcosts = cp.tc_bps(weight_df = rebal_weights, 
                          share_panel = panel,
                          bps = 10.,
    )
    cols = ['EEM', 'EFA', 'IEF', 'IWV', 'IYR', 'SHY']
    testing.assert_frame_equal(manual_tc_bps[cols], vw_tcosts)
コード例 #2
0
def test_tc_bps(rebal_weights, panel, manual_tc_bps):
    vw_tcosts = cp.tc_bps(weight_df = rebal_weights, 
                          share_panel = panel,
                          bps = 10.,
    )
    cols = ['EEM', 'EFA', 'IEF', 'IWV', 'IYR', 'SHY']
    testing.assert_frame_equal(manual_tc_bps[cols], vw_tcosts)
コード例 #3
0
def test_net_bps(rebal_weights, panel, manual_tc_bps, manual_index):
    
    index = test_pfp(panel, manual_index)
    index = index['Close']

    vw_tcosts = cp.tc_bps(weight_df = rebal_weights, 
                          share_panel = panel,
                          bps = 10.,
    )

    net_tcs = cp.net_tcs(tc_df = vw_tcosts, 
                         price_index = index
    )

    testing.assert_series_equal(manual_tc_bps['adj_index'],
                                net_tcs
    )
コード例 #4
0
def test_net_bps(rebal_weights, panel, manual_tc_bps, manual_index):
    
    index = test_pfp(panel, manual_index)
    index = index['Close']

    vw_tcosts = cp.tc_bps(weight_df = rebal_weights, 
                          share_panel = panel,
                          bps = 10.,
    )

    net_tcs = cp.net_tcs(tc_df = vw_tcosts, 
                         price_index = index
    )

    testing.assert_series_equal(manual_tc_bps['adj_index'],
                                net_tcs
    )