示例#1
0
文件: api.py 项目: dxcv/fund
def tracking_error_a(r, r_bm, period):
    try:
        return sample_check((
            0,
            1,
        ), 3)(api.tracking_error_a)(r, r_bm, period)

    except AssertionError:
        return ERROR_VAL
示例#2
0
文件: api.py 项目: dxcv/fund
def periods_neg_prop(r):
    try:
        return sample_check((0, ), 1)(api.periods_neg_prop)(r)

    except AssertionError:
        return ERROR_VAL
示例#3
0
文件: api.py 项目: dxcv/fund
def periods_pos(r):
    try:
        return sample_check((0, ), 1)(api.periods_pos)(r)

    except AssertionError:
        return np.nan
示例#4
0
文件: api.py 项目: dxcv/fund
def return_a(p, t):
    try:
        return sample_check((0, ), 4)(api.return_a)(p, t)

    except AssertionError:
        return ERROR_VAL
示例#5
0
文件: api.py 项目: dxcv/fund
def accumulative_return(p):
    try:
        return sample_check((0, ), 2)(api.accumulative_return)(p)

    except AssertionError:
        return ERROR_VAL
示例#6
0
文件: api.py 项目: dxcv/fund
def value_at_risk(r, m=1000, alpha=0.05):
    try:
        return sample_check((0, ), 2)(api.value_at_risk)(r, m, alpha)

    except AssertionError:
        return ERROR_VAL
示例#7
0
文件: api.py 项目: dxcv/fund
def standard_deviation(r):
    try:
        return sample_check((0, ), 3)(api.standard_deviation)(r)

    except AssertionError:
        return ERROR_VAL