示例#1
0
def test_exch_stats():
    danube = load_danube()
    smi = load_smi(as_returns=True)

    # no ties
    stat = rad_sym_test(danube)
    assert_almost_equal(stat.statistic, 0.229749862416269)

    # ties
    stat = rad_sym_test(smi)
    assert_almost_equal(stat.statistic, 0.0582653061224491)
示例#2
0
def test_exch_stats():
    danube = load_danube().values
    smi = load_smi(as_returns=True).values

    # no ties
    stat = exch_test(danube[:, 0], danube[:, 1])
    assert_almost_equal(stat.statistic, 0.05196866)

    # ties
    stat = exch_test(smi[:, 0], smi[:, 1])
    assert_almost_equal(stat.statistic, 0.01316327)

    stat = exch_test(smi[:, 1], smi[:, 2])
    assert_almost_equal(stat.statistic, 0.02795918)
示例#3
0
def smi():
    return load_smi().iloc[:, :4]